It would take 2 moles of oxygen to react with 4 moles of magnesium. Here is why: In the equation it takes 2 moles of magnesium to react with one mole of oxygen. If you have 4 moles of magnesium it is twice what you used in the equation, so just use twice the amount of oxygen you used in the equation.