Does this help? If it doesn't i can try to explain more if you want.
To find the hypotenuse of the triangle
you use the length of the legs
Plug it into the Pythagorean Theorem
so


is one of the legs
and

is the other leg
then

is the hypothenuse
The answer is 40. Hope this helped! Between 8 and 10, you can determine the least common multiple by multiplying. 8*5=40, and 10*4=40.