Hello there!
15 is a term so the first digit in the code is 4.
15-3y is an expression so the second digit in the code is 5
4 5 x x x is the code right now
Now, let's solve the third puzzle:
4(2y-3)-2y=24
8y-12-2y=24
Combine like terms:
6y=36
x=6
4 5 4 x x is the code right now
The next problem:
1/3(12x-3)=7
4x-1=7
4x=8
x=2
4 5 4 2 x is the code right now
Problem 5: I think it's infinite solutions
4 5 4 2 4 is the code!
I hope it is correct! If it isn't, don't report and send me more puzzles! I would love to strain my brain!
Your friend, 
let the other leg be x cm.
(5)^2+(x)^2=(12)
25+(x)^2=144
(x)^2=144-25
x=√119
x=10.9
So we need to find the two lines...y=mx+b where m is the slope and b is the y-intercept.
m=(dy/dx)=(7-6)/(3-1)=1/2 so
y=x/2+b, now I'll use (1,6) to solve for b
6=1/2+b, b=5 1/2=11/2 so
y1=(x+11)/2
now the other line...
m=(8-6)/(5-3)=2/2=1
y2=x+b, using point (3,6) we solve for b
6=3+b, b=3 so
y2=x+3
Since this is just two lines they will only intersect at a single point and when they do, y=y so we can say:
x+3=(x+11)/2
2x+6=x+11
x+6=11
x=5, now use either line to solve for the corresponding y value...
y2=x+3 becomes y=5+3=8 so the solution to this system is the point:
(5,8)