Answer :
According to the law of conservation of mass, the mass of reactants must be equal to the mass of products.
The balanced chemical reaction is,
[tex]Mg+\frac{1}{2}O_2\rightarrow MgO[/tex]
As we know that the molar mass of magnesium is 24 g/mole, the molar mass of [tex]O_2[/tex] is 32 g/mole and the molar mass of magnesium oxide is 40 g/mole.
From the given balanced reaction, we conclude that
As, 1 mole of magnesium react [tex]\frac{1}{2}[/tex] mole of oxygen to give 1 mole of magnesium oxide.
So, the mass of Mg is 24 g, the mass of [tex]O_2=\frac{1}{2}\times 32=16g[/tex] and the mass of MgO is 40 g.
That means 24 g of Mg react with 16 g [tex]O_2[/tex] to give 40 g of MgO.