[Geometry]
Problem: Circle $\omega$ is tangent to parallel lines $\ell_{1}$ and $\ell_{2}$ at $A$ and $B$ respectively. Circle $\omega_{1}$ is tangent to $\ell_{1}$ at $C$ and to $\omega$ externally at $P$. Circle $\omega_{2}$ is tangent to $\ell_{2}$ at $D$ and to $\omega$ externally at $Q$. Circles $\omega_{1}$ and $\omega_{2}$ are also externally tangent to each other. Given that $A Q=12$ and $D Q=8$, compute $C D$.

Solution: Let $O, O_{1}$ and $O_{2}$ be the centers, and let $r, r_{1}$ and $r_{2}$ be the radii of the circles $\omega, \omega_{1}$, and $\omega_{2}$, respectively. Let $R$ be the point of tangency between $\omega_{1}$ and $\omega_{2}$.

Let $H_{1}$ and $H_{2}$ be the projections of $O_{1}$ and $O_{2}$ onto $\overline{A B}$. Also, let $H$ be the projection of $O_{1}$ onto $\overline{O_{2} H_{2}}$. Note that $O H_{1}=r-r_{1}, O H_{2}=r-r_{2}, O O_{1}=r+r_{1}, O O_{2}=r+r_{2}$, and $O_{1} O_{2}=r_{1}+r_{2}$. From the Pythagorean Theorem, it follows that $O_{1} H_{1}=2 \sqrt{r r_{1}}$ and $O_{2} H_{2}=2 \sqrt{r r_{2}}$. Similarly, applying the Pythagorean Theorem to triangle $O_{1} H O_{2}$ yields $\left(O_{1} H\right)^{2}+\left(O_{2} H\right)^{2}=\left(O_{1} O_{2}\right)^{2}$, which is equivalent to

$$
\left(2 \sqrt{r r_{2}}-2 \sqrt{r r_{1}}\right)^{2}+\left(2 r-r_{1}-r_{2}\right)^{2}=\left(r_{1}+r_{2}\right)^{2}
$$

which yields $r^{2}=4 r_{1} r_{2}$ after simplifying.
<img_4036>



Note that $\overline{A O} \| \overline{O_{2} D}$, hence $\angle A O Q \cong \angle D O_{2} Q$, which implies that isosceles triangles $A O Q$ and $D O_{2} Q$ are similar. Thus $\angle A Q O \cong \angle D Q O_{2}$ and therefore points $A, Q$, and $D$ are collinear. Analogously, it follows that the points $B, P$, and $C$ are collinear, as are the points $C, R$, and $D$.

In right triangle $A B D, \overline{B Q}$ is the altitude to $\overline{A D}$. By similarity of triangles, it follows that $D Q \cdot D A=B D^{2}$ and $A Q \cdot A D=A B^{2}$. Hence $B D=4 \sqrt{10}, A B=4 \sqrt{15}$, and $r=2 \sqrt{15}$. Because $\frac{D O_{2}}{A O}=\frac{D Q}{A Q}=\frac{2}{3}$, it follows that $r_{2}=\frac{4}{3} \sqrt{15}$ and $r_{1}=\frac{3}{4} \sqrt{15}$.

Note that $A C=2 \sqrt{r r_{1}}=3 \sqrt{10}, B D=2 \sqrt{r r_{2}}=4 \sqrt{10}$, and

$$
C D^{2}=A B^{2}+(B D-A C)^{2}=(4 \sqrt{15})^{2}+(4 \sqrt{10}-3 \sqrt{10})^{2}=240+10=250
$$

which implies that $C D=\mathbf{5} \sqrt{\mathbf{1 0}}$.

Alternate Solution: Conclude that $r^{2}=4 r_{1} r_{2}$, as explained above. Note that $\angle C A Q \cong \angle Q D B \cong \angle Q R D$, using the fact that the two given lines are parallel and $\omega_{2}$ is tangent one of them at $D$. Quadrilateral $C A Q R$ is cyclic, so apply Power of a Point to obtain $D Q \cdot D A=D R \cdot D C$. Because $\frac{r_{2}}{r}=\frac{Q D}{Q A}=\frac{2}{3}$, conclude that $r_{2}=2 x, r=3 x$, and hence $r_{1}=\frac{9}{8} x$. It follows that $\frac{D R}{C R}=\frac{r_{2}}{r_{1}}=\frac{16}{9}$ and $D R=\frac{16}{25} \cdot C D$. Thus

$$
D R \cdot D C=\frac{16}{25} \cdot C D^{2}=D Q \cdot D A=8 \cdot 20
$$

hence $C D=5 \sqrt{10}$.

Final answer: $5 \sqrt{10}$