The first thing to do here is make sure that you write a balanced chemical equation for this synthesis reaction.
Oxygen, on the other hand, is located in group 16 of the periodic table, so it needs two electrons to complete its octet.
The chemical formula for magnesium oxide will thus be
The balanced chemical reaction looks like this
#color(red)(2)"Mg"_text((s]) + "O"_text(2(g]) -> 2"MgO"_text((s])#
Notice that the reaction consumes
Now, the problem tells you that you have
Well, if you need two moles of magnesium for every one mole of oxygen gas, it follows that this reaction will need
#2.00color(red)(cancel(color(black)("moles O"_2))) * overbrace((color(red)(2)color(white)(a)"moles Mg")/(1color(red)(cancel(color(black)("mole O"_2)))))^(color(purple)("2:1 mole ratio")) = "4.00 moles Mg"#
All you need to do now is use the mass of one mole of magnesium to determine how many grams would contain 4 moles of magnesium.
This value is given by the element's molar mass, which tells you the mass of one mole of magnesium atoms.
Magnesium has a molar mass of
#4.00color(red)(cancel(color(black)("moles Mg"))) * overbrace("24.305 g"/(1color(red)(cancel(color(black)("mole Mg")))))^(color(brown)("molar mass of Mg")) = color(green)(|bar(ul(color(white)(a/a)"97.2 g"color(white)(a/a)|)))#
The answer is rounded to three sig figs, the number of sig figs you have for the number of moles of oxygen gas.