When two bodies of masses 'm' and 'M' are separated by a distance 'r', then both the bodies experience a force of attraction towards each other. This force of attraction is called gravitational force. It is a weak force but it always act between two bodies that have mass.
The magnitude of the gravitational force is directly proportional to product of the masses and inversely proportional to the square of the distance between the masses.
This means that as the distance between the bodies is increases, the gravitational force between the bodies decreases and vice versa.
The gravitational force of attraction is given as:
74.62 g of magnesium oxide is formed from 45.00 g magnesium so 74.62-45.00= 29.62 g of oxygen is consumed or in other words a new compound is formed in the burning of magnesium in oxygen with a heavier mass than the pure magnesium.