The balanced equation is
4Fe+3O₂⇒2Fe₂O₃
We know that the mole of Fe₂O₃ is 6, and since the ratio between oxygen and Fe₂O₃ is 3:2, we can see that
3:2 = x:6 (3 oxygen moles can make 2 Fe₂O₃ moles = x oxygen moles can make 6 Fe₂O₃ moles)
Multiply outside and inside (3*6 , 2*x) and put them on opposing sides of the equation
2*x = 3*6
2x=18
x=9
Therefore 9 moles of oxygen is needed.