smaller leg = x
longer leg = y
hypotenuse = z
y=x+7
z=x+8
due to
[tex] {z}^{2} = {x}^{2} + {y}^{2} \\ (x + 8) ^{2} = {x}^{2} + (x + 7) ^{2} \\ {x}^{2} + 16x + 64 = {x}^{2} + {x}^{2} + 14x + 49 \\ {x}^{2} + 16x + 64 = 2 {x}^{2} + 14x + 49 \\ {x}^{2} - 2 {x}^{2} + 16x - 14x + 64 - 49 = 0 \\ - {x}^{2} + 2x + 15 = 0 \\ {x}^{2} - 2x - 15 = 0 \: \: (multiplied \: by \: - 1) \\ (x - 5)(x + 3) = 0 \\ then \: \: x = 5 \: \: or \: \: x = - 3[/tex]
but x cannot be -3
so smaller leg is 5 inches
then longer leg = 5+7 = 12 inches
and hypotenuse = 5+8 = 13 inches