Dear Student,
The compound X is an alcohol as alcohols react with sodium metal to produce hydrogen gas i.e. gas that burn with pop sound. The compound Y is a carboxylic acid as carboxylic acids reacts with sodium carbonate to release carbon dioxide that turns lime water milky. Alcohol and carboxylic acid reacts with sulphuric acid to give ester. Thus Z is an ester.
X = Butanol C4H9OH
Y= Butanoic acid C3H7COOH
Z = Butylbutanoate C3H7COOC4H9
Regards,