Jacob N. answered 06/14/21
25 years of experience teaching high school chemistry!
Good afternoon, Night.
Silver chloride is insoluble in water, while calcium chloride and barium chloride are soluble in water. Therefore, adding a solution of HCl to the solution that contains silver ions will cause a precipitate to form. Adding HCl to the other two solutions will not form a precipitate.
To distinguish between the solution containing calcium ions and the solution containing barium ions, one could do a flame test. Calcium ions will exhibit an orangish color in a flame, while barium ions will exhibit a green color in a flame.