We need to write system of equations to solve this problem.
we have 3 unknown variables.
a,b,c which are shorter leg, longer leg and hypotenuse.
b = a+6
c+6 = 2*a
c^2 = a^2 + b^2
(2a - 6)^2 = a^2 + (a+6)^2
4a^2 - 24a + 36 = a^2 + a^2 + 12a + 36
2a^2 = 36a
a^2 = 18a
a = 18
b = 24
c = 30