Qualitative Analysis- Distinguishing between two ions or two salts
Answering this question requires a preliminary discussion of the solubility product constants of three silver halides and the formation constants of three silver complexes. First, note that $\ce{AgCl}$, $\ce{AgBr}$, and $\ce{AgI}$ are all insoluble in water, but insoluble is a relative term in the end. Their respective solubility equilibria and solubility product constants, i.e., equilibrium constants for their dissolution, are:

$$\ce{AgCl(s) &lt;=&gt; Ag^+ (aq) + Cl^- (aq) \quad $K_\mathrm{sp(1)} = \pu{1.8E-10}$              \tag 1}$$

$$\ce{AgBr(s) &lt;=&gt; Ag^+ (aq) + Br^- (aq) \quad $K_\mathrm{sp(2)} = \pu{5.4E-13}$              \tag 2}$$

$$\ce{AgI(s) &lt;=&gt; Ag^+ (aq) + I^- (aq) \quad $K_\mathrm{sp(3)} = \pu{8.3E-17}$              \tag 3}$$

Silver ions also form complexes with ammonia, thiosulfate ion, and cyanide ion. The formation equilibria and associated equilibrium constants are as follows:

$$\ce{Ag^+ (aq) + 2 NH3 (aq) &lt;=&gt; [Ag(NH_3)_2]^+ (aq) \quad $K_\mathrm{f(4)} = \pu{1.6E7}$              \tag 4}$$

$$\ce{Ag^+ (aq) + 2 S2O_3^2- (aq) &lt;=&gt; [Ag(S2O3)2]^3- (aq) \quad $K_\mathrm{f(5)} = \pu{2.0E13}$              \tag 5}$$

$$\ce{Ag^+ (aq) + 2 CN^- (aq) &lt;=&gt; [Ag(CN)2]^- (aq) \quad $K_\mathrm{f(6)} = \pu{1.0E21}$              \tag 6}$$

Now consider the following sequence of aqueous solution additions:


An aqueous $\ce{NaCl}$ solution is added to an aqueous solution of $\ce{AgNO3}$. Then $\ce{AgCl}$ precipitates, as per equilibrium (1).
Next concentrated ammonia is added in excess, i.e., well above the 2 to 1 stoichiometry of equilibrium (4). Then the following equilibrium, obtained by adding equilibria (1) and (4), occurs:


$$\ce{AgCl (s) + 2 NH3 (aq) &lt;=&gt; [Ag(NH3)2]^+ (aq) + Cl^- (aq) \quad $K_\mathrm{sp(1)} K_\mathrm{f(4)}  = \pu{2.9E-3}$              \tag 7}$$

Although the equilibrium constant is less than unity, adding concentrated ammonia in excess (in a hood!) results in all of the $\ce{AgCl}$ dissolving: the equilibrium is driven to the right.


Next $\ce{NaBr}$ is added. This results in precipitation of $\ce{AgBr}$ via the following equilibrium:


$$\ce{[Ag(NH_3)_2]^+ (aq) + Br^- (aq) &lt;=&gt; AgBr (s) + 2 NH3 (aq) \quad $1/(K_\mathrm{sp(2)} K_\mathrm{f(4)})  = \pu{1.2E5}$              \tag 8}$$

This equilibrium is simply the reverse of the addition of equilibria (2) and (4).


Next excess sodium thiosulfate ($\ce{Na2S2O3}$) is added. Then $\ce{AgBr}$ dissolves as per the following equilibrium, obtained by adding equilibria (2) and (5):


$$\ce{AgBr (s) + 2 S2O3^2- (aq) &lt;=&gt; [Ag(S2O3)2]^3- (aq) + Br^- (aq) \quad $K_\mathrm{sp(2)} K_\mathrm{f(5)}  = \pu{10.8}$              \tag 9}$$


Next $\ce{KI}$ is added. This results in precipitation of $\ce{AgI}$ via the following equilibrium:


$$\ce{[Ag(S2O3)2]^3- (aq) + I^- (aq) &lt;=&gt; AgI (s) + 2 S2O3^2- (aq) \quad $1/(K_\mathrm{sp(3)} K_\mathrm{f(5)})  = \pu{6.0E2}$              \tag{10} }$$

This equilibrium is simply the reverse of the addition of equilibria (3) and (5).


Lastly, $\ce{KCN}$ is added: in a hood, with proper safety precautions! Then $\ce{AgI}$ dissolves as per the following equilibrium, obtained by adding equilibria (3) and (6):


$$\ce{AgI (s) + 2 CN^- (aq) &lt;=&gt; [Ag(CN)2]^- (aq) + I^- (aq) \quad $K_\mathrm{sp(3)} K_\mathrm{f(6)}  = \pu{8.3E4}$              \tag{11} }$$

When I did this demo in lectures, I skipped the last step in order to avoid dealing with the hazardous waste issue that cyanide solutions present.

So now, at long last, the OP's questions:


Distinguish between $\ce{AgCl}$ and $\ce{AgI}$ by adding ammonia. 


From equilibrium (7), $\ce{AgCl}$ can be dissolved if an excess of concentrated ammonia is added. Trust me: this should be done in a hood! But, comparing equilibria (1) and (7), $\ce{AgI}$ is more than a million times less soluble than $\ce{AgCl}$, so no amount of concentrated ammonia will significantly dissolve $\ce{AgI}$.


The OP's second question involves distinguishing between silver ion and the silver ammonia complex. 


The OP's answer sheet claims that adding $\ce{NaCl}$ should result in only silver ion giving a precipitate. But equilibrium (7) shows that sufficiently high chloride ion concentrations should result in $\ce{AgCl}$ precipitation. But silver also forms $\ce{[AgCl2]^-}$, $\ce{[AgCl3]^2-}$, and $\ce{[AgCl4]^3-}$ , when the chloride concentration is high. So adding chloride will not cause AgCl to precipitate, in agreement with the OP's answer sheet. See here as well.

Last thought: I have done this demo in lecture, minus the last cyanide step, and I think the OP should not be expected to know all this stuff, especially if an exam is involved. The entire point of this kind of problem is to show that we can control equilibria to our advantage in, e.g., gold extraction via the cyanide process, and insoluble is a relative term.



Source of all solubility product constants and formation constants:

Daniel C. Harris, Appendix I In Quantitative Chemical Analysis; 7th Ed.; W. H. Freeman &amp; Company: New York, NY, 2007 (ISBN: 0-7167-7041-5; ISBN-13: 9780716770411).