8,9

Given a regular triangular pyramid $P A B C$ ( $P$ - vertex) with the side of the base $a$ and the lateral edge $b$ ( $b>$ a ). A sphere lies above the plane of the base $A B C$, touches this plane at point $A$ and, in addition, touches the lateral edge $P B$. Find the radius of the sphere.
Since the sphere touches the base plane of the pyramid at point $A$, its center $O$ lies on the perpendicular to the plane $ABC$ passing through point $A$. Let $M$ be the center of the base $ABC$. Then the lines $OA$ and $PM$ are parallel, as they are perpendicular to the plane $ABC$, meaning they lie in the same plane. Let $R$ be the radius of the sphere. From the vertex $O$ of the trapezoid $OAMP$, drop a perpendicular $OF$ to the base $PM$. From the right triangles $APM$ and $OFP$, we find that

$$
\begin{gathered}
PM = \sqrt{AP^2 - AM^2} = \sqrt{b^2 - \left(\frac{a \sqrt{3}}{3}\right)^2} = \sqrt{b^2 - \frac{a^2}{3}} \\
OP^2 = OF^2 + PF^2 = AM^2 + (PM - FM)^2 = \frac{a^2}{3} + \left(\sqrt{b^2 - \frac{a^2}{3}} - R\right)^2 = \\
= R^2 + b^2 - 2R \sqrt{b^2 - \frac{a^2}{3}}
\end{gathered}
$$

Let $E$ be the point of tangency of the sphere with the edge $BP$. Then

$$
OP^2 = OE^2 + PE^2 = R^2 + (PB - BE)^2 = R^2 + (PB - AB)^2 = R^2 + (b - a)^2
$$

From the equation

$$
R^2 + b^2 - 2R \sqrt{b^2 - \frac{a^2}{3}} = R^2 + (b - a)^2
$$

$$
R = \frac{a(2b - a) \sqrt{3}}{2 \sqrt{3b^2 - a^2}}
$$

## Answer

$\frac{a(2b - a) \sqrt{3}}{2 \sqrt{3b^2 - a^2}}$