Your equation is correct
The rest of it is almost correct. You have 25 g of Ag(NO3). I probably misled you by mentioning only
silver instead of
silver nitrate. The problem specified 25 g of silver nitrate, so you need to use the molecular weight of silver nitrate, 169.87 g/mole.
1
According to the equation, you need 1 mole of Mg for every 2 moles of Ag+ so
169.87
The atomic weight of Mg is 24.3050 so you need
The reason I didn't use Ag(NO3) in the half reactions, but only used Ag+ is that the NO3- group, in this case, doesn't do anything. It's merely a "spectator ion". You could have written
and this would also have been correct.
in one equation, like you had, the math becomes
unless
I made a mistake.