This is a simple application of Pythagoras' Theorem.
Take the length of the perpendicular as $p$. Now you will have two right angled triangles $ADB$ and $BDC$ with a common base :

Apply Pythagoras' Theorem to both triangles.
$x^2 + p^2 = 9$
$(6-x)^2 + p^2 = 27$
Equate $p^2$ and solve for $x$, you will get $x = 1.5$
i.e. $\frac{DC}{AD} = \frac{6-1.5}{1.5} = \frac{4.5}{1.5} = 3:1$