Is the picture you show directly from your book? If so then that formula is NOT correct. You show the angle measured from the positive y-axis but ask about angle AOP when A is on the x-axis.
The standard definition for angles is that positive angles are measured counter-clockwise from the positive x-axis, negative angles are measured clockwise. Let's say that the line OP is "x" degrees below line OA and that OG is "x" degrees to the left of the vertical line. Taking line OAG to be measured clockwise from the positive x-axis, NOT the positive y-axis as shown, the measure of OAG is -(270-x)= -270+ x degrees. The measure of AOP is theta= 360- x. 90- theta= 90-(360- x)= -270+ x