The gas evolved at anode during electrolysis of brine is chlorine (G). When chlorine gas is passed through dry Ca(OH)2 (Y) produces bleaching powder (Z) used for disinfecting drinking water.

Since Y and Z are calcium salts, therefore X is also a calcium salt and is calcium carbonate.
CaCO3 + 2HCl → CaCl2 + CO2 + H2O
Ca(OH)2 + CO2 → CaCO3 + H2O