1. The position vector of A is (-r,0)
The position vector of B is (r, 0)
The position vector of P is
3. Now calculate
And therefore the legs of a right triangle are perpendicular. (Thales theorem)
To the second question:
The cordinates of the squares vertices are O(0, 0), A(s, 0), B(s, s), C(0, s) where s means the side length.
Calculate the vectors of the diagonals and prove that the scalar product of these two vectors is zero.