Yellow coloured powder X which is soluble in CS2 is sulphur. Sulphur burns in oxygen to give sulphur dioxide gas (SO2) which is suffocating smelling gas.
S + O2 -------> SO2
SO2 gas turns moist blue litmus red. This confirms that the gas is acidic in nature. Hence, S is a non-metal.