So with respect to the observer, there are two forces on the earth,
first the centripetal force $Mr_2\omega^2$ and the other is the pseudo force
due to the acceleration of observer which is $Mr_1\omega^2$
In cases like this, where and object appears to be stationary in an accelerating reference frame, the pseudo centrifugal force is equal in magnitude and opposite in direction to the centripetal force and we use the radial distance of the object ($r_2$) from the centre of rotation to determine the centrifugal force and not the radial location of the observer.
As, Biophysicist points out, the centrifugal force observed in a rotating reference frame is not always a reaction to an opposite centripetal force. For example, if an observer is standing on the perimeter of a rotating turntable, and releases a ball, the ball will appear to accelerate outward in a curved path and the observer will attribute this to the pseudo centrifugal force and in this case the centrifugal force appears to be present even without the corresponding centripetal force. In this latter case the a n accelerometer mounted on the ball would measure no proper acceleration and the ball is actually moving inertially.
This pseudo force is usually inferred and is not directly measurable. When cornering hard in a car we can feel radial forces acting on us. The force we feel is the inward acting centripetal force and an accelerometer measures only this inward force. For a long time it was assumed that centrifugal forces provided the force required to counter the centripetal force of gravity acting on an orbiting body. When Einstein formulated General Relativity, gravity was no longer considered a force and orbiting bodies just follow geodesics. Since there is no centripetal force provided by gravity, there is no centrifugal force required to balance it in the case of orbiting bodies. An accelerometer attached to a small satellite would not measure any proper radial forces. (This is why astronauts appear to be weightless in International Space Station.) So for your case of the Earth orbiting the Sun, there is actually no centrifugal force acting on the Earth as a result of it orbiting the Sun. (but there is centrifugal force experienced by a non inertial observer standing on the the surface of the Earth as a result of Earth's own spin and this slightly reduces the apparent force of gravity and gives the Earth its oblate shape).