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 $4, \sqrt{3}, \frac{8}{\sqrt{19}}$ and $8 \sqrt{\frac{3}{19}}$ respectively (the bases 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 the diagonal $B D$, if it is additionally known that $A C=10$.
Answer: $A P: P C=4, B D=\frac{35}{\sqrt{19}}$.

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{19}}{8}$ for the first pair and $k_{2}=\frac{\sqrt{19}}{2}$ for the second pair.

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

Thus, $A P: P C=8 x: 2 x=4: 1$.

If $A C=10$, then $8 x+2 x=10, x=1$. Therefore, $B D=x \sqrt{19}+\frac{16 x}{\sqrt{19}}=\frac{35 x}{\sqrt{19}}=\frac{35}{\sqrt{19}}$.