The radius of the circumscribed circle $R$ is known.

a) Find $A P^{2}+B P^{2}+C P^{2}+D P^{2}$.

b) Find the sum of the squares of the sides of the quadrilateral $A B C D$.
Let $\angle A O B=2 \alpha$ and $\angle C O D=2 \beta$. Then $\alpha+\beta=\angle A D P+\angle P A D=90^{\circ}$. Therefore $\left(A P^{2}+B P^{2}\right)+\left(C P^{2}+D P^{2}\right)$ $=A B^{2}+C D^{2}=4 R^{2}\left(\sin ^{2} \alpha+\cos ^{2} \alpha\right)=4 R^{2}$. Similarly $B C^{2}+A D^{2}=4 R^{2}$.