Your second reaction is incorrect.
You haven't balanced the number of OH
- ions. The proper reaction is as follows:
Mg(OH)
2(aq) + 2NH
4Cl(aq)
MgCl
2(aq) + 2NH
3(aq) + 2H
2O(l)
We also must remember that NH
3 exists in an equilibrium in solution as ammonium hydroxide, so I could have also written 2NH
4OH, instead; this is where the common ion effect comes into play.
The reaction occurs because NH
4Cl has this equiliburm in solution:
NH
4Cl
NH
3 + H
+ + Cl
-The formation of H
+ causes the Mg(OH)
2 to react and form water and Mg
2+ in solution; however, this reaction is quickly offset by the latter creation of OH
- ions as a result of NH
3.