Prove that in a right triangle, the projections of the legs onto the hypotenuse are proportional to the squares of the legs.