(a). Remember that oxides are compounds that are formed by oxygen and another element. Oxygen has always been the 2- ion. So, to write the formula of manganese oxide, you can follow the steps:
You can realize that the algebraic sum of these two ions is +3 (2) + 3 (-2) = 0. The algebraic sum of the ions of each element must be always zero, so the formula of manganese oxide is Mn2O3.
(b). Magnesium has always the ion +2, which is called the oxidation number too. We have that the oxidation numbers of phosphorus are -3, -4, and -5. The name phosphide is telling us that we have to use the less number of ions that phosphorus has, in this case, is -3. So applying the last process ( Part (a) ), we can conclude that the formula of magnesium phosphide is Mg3P2. You can note that the algebraic sum of the ions is: +2 (3) -3 (2) = 0.