$NaCN+HN{{O}_{3}}\to NaN{{O}_{3}}+HCN\uparrow $
$N{{a}_{2}}S+2HN{{O}_{3}}\to 2NaN{{O}_{3}}+{{H}_{2}}S\uparrow $
If cyanide and sulphide ions are not decomposed, they will react with silver nitrate and hence will interfere with the test.
$NaCN+AgN{{O}_{3}}\to \underset{\begin{smallmatrix}
Silver \\
cyanide
\\
(White\,ppt.)
\end{smallmatrix}}{\mathop{AgCN}}\,+NaN{{O}_{3}}$
$N{{a}_{2}}S+2AgN{{O}_{3}}\to \underset{\begin{smallmatrix}
Silver \\
sulphide
\\
(Black\,ppt.)
\end{smallmatrix}}{\mathop{A{{g}_{2}}S}}\,+2NaN{{O}_{3}}$