use the pythagorean thereom. Hypotenuse is always going to be longest part of a triangle.
A^2 + B^2 = C ^2
2^2 + 24^2 = C^2
4 + 576 = C^2
580 = C^2
To get rid of the power, you have square root each side, in this case C would be H, for hypotonuse.
Its approx 24.08 feet.