The problem is to decide whether the salt that is made is soluble or insoluble.
Think about two soluble salts of formula AB and CD (These are just letters to represent the salt). If solutions are mixed, you will get a precipitate if either AD or CB is insoluble. The reaction is sometimes called double decomposition. To find out look up data on solubility or solubility rules.
eg, will mixing solutions of sodium carbonate and copper(II) sulphate form a precipitate? Possible products are sodium sulphate and copper(II) carbonate.
Using solubility rules, you find that sodium salts are soluble but carbonates of metal ions such as copper as insoluble. So you will get a precipitate of copper(II) carbonate. The equations below show how the reaction can be written
Na2CO3(aq) + CuSO4(aq) ---> Na2SO4(aq) + CuCO3(s)
(Na+)2CO32-(aq) + Cu2+SO42-(aq) ---> (Na+)2SO42-+ Cu2+CO32-(s)
2Na+(aq) + CO32-(aq) + Cu2+(aq) + SO42-(aq) ---> 2Na+(aq) + SO42- + Cu2+CO32-(s)
Cu2+(aq) + SO42-(aq) ---> Cu2+CO32-(s) or CuCO3(s) (not showing spectator ions)