When you are talking about the mass in grams for a unit of a given chemical formula you are talking about finding the molecular weight for the given chemical. You can do this by adding the molecular weights of the various elements in the formula. The molecular weight of any element can readily be found on the periodic table. So for Fe2O3, take the molecular weight of iron and multiply it by two. Take the molecular weight of oxygen and multiply it by three. Then add the two numbers.
(55.8 * 2) + (16 * 3) = 111.6 + 48 = 159.6
So the formula weight of Fe2O3 is 159.6 grams per mole.