Hello, Lizarrdo!
Code:C * *| * * | * x * |h * * | * * | * A * * * * * * * B x-5 D x-3
Note that
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: . .[1]
In right triangle .[2]
Equate [1] and [2]: .
We have: .
. . Therefore: .