We have three similar triangles, because each has a right angle and shares an angle. Let's write the angles in order: opposite to short leg, long leg, hypotenuse.
CAB similar to BAD similar to CBD
Or as ratios,
CA:AB:CB = BA:AD:BD = CB:BD:CD
We also know
AC = AD + CD
(AD+CD):AB:CB = BA:AD:BD = CB:BD:CD
(AD+CD)/CB=CB/CD
We have CB=6, AD=5 and seek x=CD.




We reject the negative root and conclude x=4
Answer: 4