The length of the longer leg of a right triangle is 6 inches more than twice the length of the shorter leg. The length of the hypotenuse is 9 inches more than twice the length of the shorter leg. Find the lengths of the triangle.

Let x be the length of the shorter leg.

Then, the length of the longer leg is 2x + 6, and the length of the hypotenuse is 2x + 9.

Using the Pythagorean theorem, we have:
x^2 + (2x + 6)^2 = (2x + 9)^2
Expanding both sides, we get:
x^2 + 4x^2 + 24x + 36 = 4x^2 + 36x + 81
Combine like terms and simplify:
5x^2 + 24x + 36 = 4x^2 + 36x + 81
Subtract 4x^2 and 36x from both sides:
x^2 - 12x - 45 = 0
Factor the quadratic equation:
(x - 15)(x + 3) = 0
x = 15 or x = -3

Since the length of a side cannot be negative, the length of the shorter leg is 15 inches.
The length of the longer leg is 2(15) + 6 = 36 inches.
The length of the hypotenuse is 2(15) + 9 = 39 inches.

Therefore, the lengths of the triangle are 15 inches, 36 inches, and 39 inches.