what happens to Br-,SO42- and CO32- anions when its sodium salt is treated with

(1) NH3 and BaCl2 and
(2) HNO3 and AgNO3 solutions. Give the formulas of the products formed.