The longer hypotenuse is found using the Pythagorean theorem as ...
The right triangles are AA similar, and vertical sides correspond. Their ratio, smaller/larger is 5/8. That means the hypotenuse of the smaller triangle, A, is 5/8 of the hypotenuse of the larger one.