One of the legs of a right triangle has length 4cm. Express the length of the altitude perpendicular to the hypotenuse as a function of the length of the hypotenuse.

I know this divides the Right Triangle into 2 other Right Triangles with an shared side but couldn't see how to set up the equation using this, that is if that is the best way to do it.

The answer to this is

where is the length of the altitude and is the length of the hypotenuse