there are three right angled triangles that you can use to apply phythagoras theorem. apply that theorem to two of them find the lenght of unknown sides with the variable x.
then apply the pythagoras theorem to the other triangle to find x
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: .