The correct option is
A N2A colorless water soluble crystalline solid
(A) on heating gives
O2 and gives a water soluble crystalline solid
(B).
2KNO3(s)→2KNO2(s)+O2(g)
So, A is KNO3(crystalline solid) and B is KNO2(water soluble crystalline solid). Both A and B impart violet coloration to the Bunsen flame.
When B is heated with NH4Cl, inactive gas (C) is obtained but when A is heated with NH4Cl, a gas (D) which supports combustion is formed.
NH4Cl+KNO2→N2+KCl+2H2O
So the gas C is N2.
Hence option B is correct.