5. The diagonals $A C$ and $B D$ of the quadrilateral $A B C D$, inscribed in a circle, intersect at point $P$. It is known that the distances from point $P$ to the sides $A B, B C, C D, D A$ are $5, \sqrt{3}, \frac{5}{\sqrt{7}}$ and $5 \sqrt{\frac{3}{7}}$ respectively (the feet of the perpendiculars dropped from point $P$ to the sides lie on these sides).

a) Find the ratio $A P: P C$.

b) Find the length of diagonal $B D$, given that $A C=12$.
Answer: $A P: P C=5, B D=\frac{24}{\sqrt{7}}$.

Solution. Since inscribed angles subtended by the same arc are equal, $\angle P B C=$ $\angle P A D, \angle P C B=\angle P D A$. Therefore, triangles $P B C$ and $P D A$ are similar. Similarly, it can be proven that $\triangle A B P \sim \triangle D C P$. Corresponding elements of similar figures are proportional to the similarity coefficient. In this case, the corresponding elements are the heights drawn from vertex $P$. From this, we find that the similarity coefficient is $k_{1}=\frac{\sqrt{7}}{5}$ for the first pair and $k_{2}=\sqrt{7}$ for the second pair.

Let $A P=5 x$. Then $B P=A P \cdot k_{1}=x \sqrt{7} ; C P=\frac{B P}{k_{2}}=x, D P=\frac{A P}{k_{2}}=\frac{5 x}{\sqrt{7}}$.

Thus, $A P: P C=5 x: x=5: 1$.

If $A C=12$, then $5 x+x=12, x=2$. Therefore, $B D=x \sqrt{7}+\frac{5 x}{\sqrt{7}}=\frac{12 x}{\sqrt{7}}=\frac{24}{\sqrt{7}}$.