Answer:
Altitude has property that it falls at right angle.
So, we use pythagoras theorem it both ΔADC and ΔDBC.
In ΔADC
(AC)² = (AD)² + (DC)²
⇒ (AC)² = x² + 9
and in ΔDBC
(BC)² = (BD)² + (DC)²
⇒ x² = (3 - x)² + 9
Substituting this value of x in (AC)²
We get, (AC)² = (3 - x)² + 9 + 9
This is the method to solve this question.