To find the length of a diagonal in a rectangle you use the Pythagoras theoren to find the length of the hypotenuse (x) in the right triangle formed by the diagonal length and height of the rectangle:
Pythagoras theorem:
h is the hypotenuse
l are the legs of the right triangle
Then the length of the diagonal is 25 inches