i have a good idea of the answer i just need confirmation! Thanks!

ANSWER
7 moles of MgO was produced during the reaction
EXPLNATION
Given that;
The number of moles of oxygen is 3.5 moles
Follow the steps below to find the number of moles of MgO
Step 1; Write a balanced equation of the reaction
[tex]\text{ 2Mg + O}_2\text{ }\rightarrow\text{ 2MgO}[/tex]In the equation above 2 moles Mg react with 1 mole oxygen to produce 2 moles MgO
Step 2; Find the number of moles of MgO using a stoichiometry ratio
Let x represents the number of moles of MgO
[tex]\begin{gathered} \text{ 1 mole O}_2\text{ }\rightarrow\text{ 2 moles MgO} \\ \text{ 3.5 moles O}_2\text{ }\rightarrow\text{ x moles MgO} \\ \text{ Cross multiply} \\ \text{ 1 mole O}_2\times\text{ x moles MgO = 2 moles MgO }\times\text{ 3.5moles O}_2 \\ \text{ Isolate x} \\ \text{ x moles MgO = }\frac{2\text{ moles MgO}\times3.5moles\cancel{O_2}}{1mole\cancel{O_2}} \\ \\ \text{ x moles MgO = 2 }\times\text{ 3.5} \\ \text{ x moles of MgO = 7 moles} \end{gathered}[/tex]Therefore, 7 moles of MgO was produced during the reaction