Label 4 points on the largest right triangle, A, B, C, D. There is a theorem (right triangle altitude theorem or geometric mean theorem) that establishes similarity between the 3 triangles in the image.

So corresponding sides occur proportionally to one another such that

