$AgNO _3+ NaCl \rightarrow AgCl + NaNO _3$
No. of moles of $AgNO _3=\frac{3.4}{170}=0.02$
No. of moles of $NaCl =\frac{5.85}{58.5}=0.1$
Limiting reagent $= AgNO _3$
$\because 1$ mole of $AgNO _3$ produces 1 mole of $AgCl$
$\therefore 0.02$ mole of $AgNO _3$ will produce $0.02$ mole of $AgCl$
Weight of $AgCl$ produced $=0.02 \times 143.5$
$=2.870 g$