Step 1: Read the clues carefully.
We are told a solid $X$ reacts with acetic acid and gives off a gas $Y$ that has no colour and no smell. That gas turns lime water milky. In chemistry, turning lime water milky is the standard identity card for one gas only, carbon dioxide.
Step 2: Match the gas to the reaction type.
Carbonates and bicarbonates are the compounds that release $CO_2$ when they meet an acid, weak or strong. So we can already fix gas $Y$ as $CO_2$: \[ Ca(OH)_2 + CO_2 \to CaCO_3\downarrow + H_2O \] The white $CaCO_3$ precipitate is exactly what makes the water look milky.
Step 3: Rule out the wrong solids.
Sodium hydroxide is a base, mixing it with acetic acid is just neutralisation, no gas comes out at all, so option A is out. Sodium acetate is already the salt product of this reaction, it will not fizz with more acetic acid, so option C is out. $SO_2$ has a sharp irritating smell and needs sulphur in the reactants, which is not there, so option D is out. That leaves sodium bicarbonate reacting with acetic acid as the only fit. \[ CH_3COOH + NaHCO_3 \to CH_3COONa + H_2O + CO_2\uparrow \]
Step 4: Conclude.
The solid $X$ is sodium bicarbonate and the gas $Y$ is carbon dioxide. \[ \boxed{X = NaHCO_3,\ Y = CO_2} \]