4. A circle touches the sides of an angle at points $A$ and $B$. A point $M$ is chosen on the circle. The distances from $M$ to the sides of the angle are 24 and 6. Find the distance from $M$ to the line $A B$.

![](https://cdn.mathpix.com/cropped/2024_05_06_bb70a8d18e0320708328g-3.jpg?height=691&width=1102&top_left_y=1057&top_left_x=451)
Solution: $\angle \mathrm{XBM}=\angle \mathrm{ZAM}=\frac{1}{2} \overline{\mathrm{BM}}$, therefore, triangles ВМХ and ZAM are similar, so $\frac{\mathrm{XM}}{\mathrm{ZM}}=\frac{\mathrm{BM}}{\mathrm{AM}} \cdot \angle \mathrm{ABM}=\angle \mathrm{YAM}=\frac{1}{2} \overline{\mathrm{AM}}$, therefore, triangles $\mathrm{AMY}$ and $\mathrm{BMZ}$ are similar, so $\frac{\mathrm{YM}}{\mathrm{ZM}}=$ $\frac{\mathrm{AM}}{\mathrm{BM}} \cdot$ Therefore,

$$
\mathrm{ZM}^{2}=\mathrm{XM} \cdot \mathrm{YM}=24 \cdot 6=144, \quad \mathrm{ZM}=12
$$

Answer: 12