The number of O's on reactant side of the equation is
6 Mg + 2 PO₃ ➔ ? MgO + 2 P