Magnesium metal burns in oxygen to form magnesium

oxide, MgO.
(a) Write a balanced equation for the reaction

Why is it 2Mg+O2->2MgO
and not Mg+O->MgO

2 answers

because oxygen comes in O2 molecules, not single-atom units.
Remember the mnemonic of "Have No Fear Of Ice Cold Beer".
hydrogen
nitrogen
fluorine
oxygen
iodine
chlorine
bromine

and add their cousins of P4 and S8.
The other elements are monatomic at room T and P.