#"H"_3"PO"_4" + Mg(OH)"_2##rarr##"Mg"_3"(PO"_4)_2 + "H"_2"O"#
Balance the magnesium first. There are three magnesium ions on the right side and only one on the left side. Add a coefficient of #3# in front of #"Mg(OH)"_2"#..
#"H"_3"PO"_4" + 3Mg(OH)"_2##rarr##"Mg"_3"(PO"_4)_2 + "H"_2"O"#
Next balance the #"PO"_4"#.
There are two #"PO"_4"# ions on the right side and one on the left. Place a coefficient of #2# in front of #"H"_3"PO"_4"#.
#"2H"_3"PO"_4" + 3Mg(OH)"_2##rarr##"Mg"_3"(PO"_4)_2 + "H"_2"O"#
Next balance the #"H"#. There are twelve hydrogens on the left side and two on the right. Place a coefficient of #6# in front of #"H"_2"O"# on the right side.
#"2H"_3"PO"_4" + 3Mg(OH)"_2##rarr##"Mg"_3"(PO"_4)_2 + "6H"_2"O"#
Balance the #"O"#. There are fourteen oxygen atoms on both sides of the equation, so it is already balanced.
Balanced Equation
#"2H"_3"PO"_4" + 3Mg(OH)"_2##rarr##"Mg"_3"(PO"_4)_2 + "6H"_2"O"#