In figure, AP and BQ are perpendiculars to the line segment AB and AP = BQ. Prove that O is the midpoint of line segment AB as well as PQ.