The Lassaigne’s extract is first boiled with dil. HNO3 to decompose cyanide or sulphide of sodium (NaCN or Na2S) formed during Lassaigne’s test. These ions would otherwise interfere with silver nitrate test for halogen.
NaCN(aq)+HNO3(aq)→NaNO3(aq)+HCN(↑)
Na2S(aq)+2HNO3(aq)→2NaNO3(aq)+H2S(↑)
Hence option D is the answer.