Code:C * *| * * | * x * |h * * | * * | * A * * * * * * * B x-5 D x-3
We have right triangle
The altitude to the hypotenuse is: .
It divides the hypotenuse into two segments: .
Fact: The altitude to the hypotenuse is the geometric mean
. . . . . . . . . of the segments of the hypotenuse.
Hence, we have: . .
In right triangle .
Equate  and : .
We have: .
. . Therefore: .