The hypotenuse of a right triangle is 5 inches long. The shorter leg is 1 inch shorter than the longer leg. Find the side lengths of the triangle.

Let's call the longer leg x inches and the shorter leg (x-1) inches.

Using the Pythagorean theorem, we have:

(x-1)^2 + x^2 = 5^2
x^2 - 2x + 1 + x^2 = 25
2x^2 - 2x - 24 = 0
x^2 - x - 12 = 0
(x - 4)(x + 3) = 0

x = 4 or x = -3

Since the side lengths of a triangle cannot be negative, we have x = 4.

Therefore, the longer leg is 4 inches and the shorter leg is 3 inches.