4. Circles $\Omega$ and $\omega$ touch externally at point $F$, and their common external tangent touches circles $\Omega$ and $\omega$ at points $A$ and $B$, respectively. Line $\ell$ passes through point $B$, intersects circle $\omega$ again at point $C$, and intersects $\Omega$ at points $D$ and $E$ (point $D$ is between $C$ and $E$). The common tangent of the circles passing through point $F$ intersects lines $A B$ and $B E$ at points $P$ and $H$, respectively (point $F$ lies between points $P$ and $H$). It is known that $B C=5, D H=H C=2$. Find the length of segment $H P$ and the radii of both circles.
Answer: $H P=\frac{5 \sqrt{14}}{2}, r=\frac{3 \sqrt{7}}{\sqrt{10}}, R=\frac{3 \sqrt{35}}{\sqrt{2}}$.

Solution. We apply the tangent-secant theorem three times:

$$
\begin{gathered}
H F^{2}=H C \cdot H B=2 \cdot 7=14 \Rightarrow H F=\sqrt{14} \\
H F^{2}=H D \cdot H E \Rightarrow H E=\frac{H F^{2}}{H D}=7 \\
B A^{2}=B D \cdot B E=9 \cdot 14 \Rightarrow B A=3 \sqrt{14}
\end{gathered}
$$

Since the segments of tangents drawn from a point to a circle are equal, $P F=P A=P B$, hence $P F=\frac{1}{2} A B=\frac{3}{2} \sqrt{14}$. Therefore, $P H=P F+F H=\frac{5}{2} \sqrt{14}$. Let $\angle B P H=\gamma$. Then, by the cosine rule for triangle $B P H$, we get $B H^{2}=$ $B P^{2}+H P^{2}-2 B P \cdot P H \cdot \cos \gamma$, i.e., $49=\frac{63}{2}+\frac{175}{2}-105 \cos \gamma, \cos \gamma=\frac{2}{3}$.

Let $O$ and $Q$ be the centers, and $R$ and $r$ be the radii of circles $\Omega$ and $\omega$ respectively; since the circles are tangent, the point of tangency $F$ lies on the line of centers $O Q$, and $O Q \perp P H$. Angles $A$ and $F$ of quadrilateral $A O F P$ are right angles, so $\angle A O F=180^{\circ}-\angle A P F=\angle B P F=\gamma$.

Consider the right trapezoid $A B Q O$. In it, $O Q=R+r, O A=R, B Q=r, A B=$ $3 \sqrt{14}, \angle A O Q=\gamma$. Dropping a perpendicular $Q H$ from point $Q$ to the base $A O$, we get a right triangle $O H Q$, in which $Q H=A B=3 \sqrt{14}, O H=R-r$. By the Pythagorean theorem, we get $(R+r)^{2}=(R-r)^{2}+(3 \sqrt{14})^{2}$; also, $\frac{2}{3}=\cos \gamma=\frac{R-r}{R+r}$. From the last equation, we get $R=5 r$, and from the first, we get $R r=\frac{63}{2}$. Solving this system of equations, we find that $R=$ $3 \sqrt{\frac{35}{2}}, r=3 \sqrt{\frac{7}{10}}$.