The reason they have the same mass is the number part shows the vacancy of how many electrons the atom donated from its outer electron shell. Electrons are so small, they are generally accorded no mass at all in the grand scheme of things. It takes about 2000 electrons to equal the mass of just one proton. So right now, an Fe2+ and an Fe3+ are "even-steven". But when you combine them with oxygen, oxygen has a valence of 2-, which means it can receive two electrons from an iron atom. So Fe2+ + O2- ---> FeO, while Fe3+ + O2- ---> Fe2O3. The Fe3+ will have the heavier mass because it produces a product that has 5 atoms, compared to Fe2+ only having 3 atoms. These equations are not balanced, but that is the product you will wind up with, FeO and Fe2O3. Iron is in what is known as the "transition metals" section of the periodic table, having variable valence numbers for chemical reactions.