Question 38788
Call the shortest leg x.
The hypotenuse is x + 18.
The other leg is x + 14 since it is only 4 less than the hypotenuse.
Now apply the Pythagorean Theorem:  a^2 + b^2 = c^2 and we get
x^2 + (x + 14)^2 = (x + 18)^2
x^2 + x^2 + 28x + 196 = x^2 + 36x + 324
now collecting and solving we get
x^2 - 8x - 128 = 0
(x - 16)(x + 8) = 0
x = 16 or x = -8
but distance is never negative so the short leg is 16 and the longer leg is 30.  The hypotenuse is 34.