Let $A,B,C,D$ be points in a circumference, such that $\overline {AB}$ is a diameter and the chords $\overline {AC}$ and $\overline {BD}$ intersect in a point $P$ inside the circumference. Prove that $AB^2$ = $AP \cdot AC$ $+$ $BP \cdot BD$
(I made a image of what the problem means if i wrote something wrong)
My try
I tried a lot of things and i can't get to the answer, i tried Ptolemy's theorem with the cyclic quadrilateral $ABCD$ but i don't see a way to prove the statement.
Any hints?

Let Q is a point in AB such that $PQ \perp AB$. One then has $$AP.AC=AQ.AB$$ $$BP.BD = BQ.BA$$
Thus, one has $AP.AC + BP.BD = AB^2$.