.
Let x = the length of the hypotenuse, in feet.
Then the legs are (x-2) ft and (x-4) ft,
and you have a quadratic equation
 + 
 = 
.
Simplify, and you will get
 = 
.
There are two roots, 10 and 2.
The smaller doesn't fit. The greater does work.
Answer. 10 ft.