When dilute hydrochloric acid reacts with limestone, then calcium chloride, carbon dioxide gas (X) and water are formed.
CaCO3+2HCl→CaCl2+CO2+H2O
Reaction of gas X with lime water
When carbon dioxide gas (X) is passed through lime water, the lime water turns milky due to the formation of a white precipitate of calcium carbonate (Y).
Ca(OH)2+CO2→CaCO3+H2O
On passing excess of gas X through lime water
If excess carbon dioxide gas is passed through lime water, then the white precipitate formed first dissolves due to the formation of a soluble salt calcium hydrogencarbonate (Z), and the solution becomes clear again.
CaCO3+CO2+H2O→Ca(HCO3)2
Therefore, the compounds X, Y, and Z are carbon dioxide gas, calcium carbonate and calcium hydrogencarbonate respectively.