In a square, the diagonals are perpendicular and the sides are perpendicular, so simply compute the dot product of OP and OR, and set it equal to 0, then do the same thing for OQ and PR to get two simultaneous equations. You will have the term a.b present in both, so simply eliminate that as you normally would in a simultaneous equation, and you should end up with the desired result after some manipulation.