Firstly remember the Pythagorean theorem:
A^2 + B^2 = C^2
Plug the values of the legs of the triangle into the equation:
7^2 + 24^2 = x^2
Then simplify the left side:
49 + 576 = x^2
625 = x^2
Then square root both sides:
25 = x
Hope this helps and let me know if you have more questions!