Calculate the valence of Fe2O3
@Voldemort you learn the valencies rather than calculate them.  Valency is a fact of experiment whilst electron configuration gives an underlying explanation for the observations from experiment.

Iron has two different valencies (and oxidation states) which are a consequence of the stability of the electron configuration that remains when electrons are lost upon reaction.  So, iron can loose 2 electrons to leave a stable $\ce{Fe++}$ species; in your reaction those 2 electrons are gained by oxygen to give an anion that has 8 electrons in its outer shell which is a stable configuration.

Iron can also loose 3 electrons to leave a stable system and again, in your system, the electrons are picked up by the appropriate number of oxygen atoms to give oxygen anions that have 8 electrons in their outer shell.

If you look at the either side of the periodic table, say sodium reacting with a halogen, say chlorine (to give sodium chloride); you can see the 8 electron rule working.  But you're looking at a system where the iron is found in the middle of the periodic table and is a lot more difficult to predict when compared to the 8 electron rule.