Prove equality between segments of a circumference
Let $X$ be on $AB$ such that $PX\perp AB$. Since angles $ADB$ and $BCA$ are right angles we have $$\triangle AXP\sim \triangle ACB\quad\hbox{and}\quad \triangle BXP\sim\triangle BDA\ ,$$ so $$\frac{BX}{BP}=\frac{BD}{AB}\quad\hbox{and}\quad \frac{AX}{AP}=\frac{AC}{AB}$$ and $$AB=AX+XB=\frac{AP\cdot AC}{AB}+\frac{BP\cdot BD}{AB}\ .$$
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$.