2A. 4B. For triangle $ABC$, the following holds: $\overline{AB}=5, \overline{BC}=8, \beta=120^{\circ}$. The line through vertex $A$ that is perpendicular to side $AB$ and the line through vertex $C$ that is perpendicular to $BC$ intersect at point $D$. Calculate the length of segment $CD$.
Solution. From the conditions of the problem, it follows that $\measuredangle A D C=60^{\circ}$. Let the line $C M$ be perpendicular to $A B$, $M \in A B$ and let the line $C N$ be perpendicular to $A D$, $N \in A D$. Then,

$$
\measuredangle N C D=30^{\circ}, \measuredangle C B M=60^{\circ} \text { and } \measuredangle M C B=30^{\circ} .
$$

From this,

$$
\overline{B M}=\overline{B C} \cdot \sin 30^{\circ}=8 \cdot \frac{1}{2}=4
$$

and therefore

$$
\overline{N C}=\overline{A M}=\overline{A B}+\overline{B M}=5+4=9 \text {. }
$$

![](https://cdn.mathpix.com/cropped/2024_06_05_c86343eb2e31158b731fg-06.jpg?height=486&width=407&top_left_y=1170&top_left_x=1075)

Finally, from the right triangle $N C D$ we have

$$
\overline{C D}=\frac{\overline{N C}}{\cos 30^{\circ}}=\frac{9}{\frac{\sqrt{3}}{2}}=6 \sqrt{3}
$$