Mg + HNO3 -> Mg(NO3)2 + H2
On reactants side:
Mg=1
H=1
N=1
O=3
On products side:
Mg=1
H=2
N=2
O=6 (3×2)
Therefore to balance the equation, we must add 2 to HNO3 on the reactants side...
Mg + 2HNO3 -> Mg(NO3)2 + H2
Reactants:
Mg=1
H=2
N=2
O=6
Therefore, it's balanced.