CoCl3.xNH3+AgNO3→2molAgCl↓
For 2 moles of AgCl precipitate out,only two chloride ions should be present out side the coordination sphere that is in the ionization sphere.
Hence, the formula of the complex should be [Co(NH3)5Cl]Cl2
[Co(NH3)5Cl]Cl2+AgNO3→2molAgCl↓
So, the value of x should be 5.
x=5.