Mg has a 2+ charge
(NO3) has -1 charge
Like many elements, iron (chemical symbol Fe) can exist in more than one chemical form, or "oxidation state." The two most common forms for iron are Fe(II), in which the iron ion shares two of its electrons, and Fe(III), in which it shares three electrons.
since (NO3)3 would be a minus -3 Fe here would be 3+
so
Mg(2+) + Fe(NO3)3 <--> Mg(NO3)2 + Fe(3+)
balancing we get:
3 Mg(2+) + 2 Fe(NO3)3 <--> 3 Mg(NO3)2 + 2 Fe(3+)
you can figure out which iron ion this reaction deals with by knowing that it is bonded to 3 NO3- so -3 +3 = 0
so we are dealing with Fe(III)