Step-by-step explanation:
The law of universal gravitation states that the force exerted between two bodies and separated a certain distance, is equal to the product of their masses and inversely proportional to the square of the distance, that is:

Here G is the universal gravitational constant.
So, the force exerted by the sun is:

The force exerted by the moon is:

The force exerted by the earth is given by:
