Solution:
Concept: A fruity smell means an ester has formed. An ester comes from an alcohol and a carboxylic acid warmed with conc. sulphuric acid (esterification); the acid with a vinegar smell is ethanoic (acetic) acid.
Step 1 — (a) Identify X, Y and Z.
X is an alcohol, ethanol (C2H5OH); Y is ethanoic (acetic) acid (CH3COOH), which smells of vinegar; Z is concentrated sulphuric acid, which takes up the water formed.
Step 2 — (b) Draw X and Y.
The structural formulae of ethanol and ethanoic acid are:

Step 3 — (c) and (d) Name P and the reaction.
P is an ester, ethyl ethanoate (ethyl acetate, CH3COOC2H5), and the reaction is esterification.
Step 4 — (e) Write the reaction.
With two carbons in both X and Y:
CH3COOH+C2H5OH⇌conc. H2SO4CH3COOC2H5+H2O

Therefore, (a) X = ethanol, Y = ethanoic acid, Z = conc. H₂SO₄; (c) P is an ester (ethyl ethanoate); (d) esterification; (e) CH₃COOH + C₂H₅OH ⇌ CH₃COOC₂H₅ + H₂O.