Answer :

You must remember that oxidation number of hydrogen in acids is always +1, oxidation number of oxygen in oxides & acids is always -2... metals has always oxidation number on plus!

group NO3 comes from HNO3...and oxidation number of whole acid group is always on minus and equal to the amount of hydrogen atoms in this acid... so oxidation number of NO3 = -1

we have 2 NO3 groups so 2*(-1) = -2 and that is the reason why oxidation number of Fe in this formula must be +2... because sum of all elements always gives 0!

Now we could count of oxidation number for nitrogen... we write HNO3 and start counting from right to left:
3*(-2) from oxygens + 1 from hydrogen = -5
so nitrogen must have +5 oxidation number... because sum all in formula must be 0.