In order to properly balance an equation, we need to make sure that the same amount of elements on the reactants side matches the number of elements on the products side, we can do that by increasing the number in front of each molecule, the so called stoichiometric coefficient. In the reaction from the question we can properly balance by adding the following stoichiometric coefficients
For our reactions we have:
1.
Mg(OH)2 + 2 HCl -> MgCl2 + 2 H2O
1, 2, 1, 2
2.
H2CO3 + Sr(OH)2 -> 2 H2O + SrCO3
1, 1, 2, 1
3.
4 Ag + O2 -> 2 Ag2O
4, 1, 2
4.
N2O5 + H2O -> 2 HNO3
1, 1, 2