Compounds K3PO4 and MgCl2 are soluble in water , as phosphates of alkali metal cations are soluble in water and chlorides Of Mg²⁺ are soluble in water . So , they dissociate into ions.
Ions K⁺ and Cl⁻ combine to form KCl , soluble compound.
Ions PO₄³⁻ and Mg²⁺ combine to form Mg3(PO4)2 , a precipitate as phosfates of Mg²⁺ are insoluble in water
Thus , the balanced equation , is:
2 K3PO4(aq) + 3 MgCl2(aq ) -----------> 6 KCl(aq) + Mg(PO4)2(s)