Calculating valence of oxides
Valency is the combining power of an atom; so, when we talk of iron having a valency of 2, it can combine either with two atoms of valency of one; or with one atom of valency of two.  Oxygen has a valency of two and so the formula for iron (II) oxide is FeO.

In the history of chemistry valency pre-dates the idea of electron configuration which looks like the source of your confusion.

Hope that is clearer.

Edit: you mentioned that oxygen has a valency of minus 2; that's not quite right.  It has a valency of 2 but it can form an oxidation state of minus 2.  You need to separate out the ideas of valency and oxidation state.  Although the ideas are related, they are distinct.