Newton's 2nd law states that the result of all the forces applied to a body equals to the body's mass times its acceleration:
Gravitationnal force is calculated
So if two different bodies of masses
In both cases, the equation is of the form
A body's acceleration due to another body's gravitation depends only on the second body's mass and radius.