Step 1: Understanding the Topic:
This problem deals with "Amines" and the "Haloalkanes and Haloarenes" chapters. It specifically targets the ambidentate nature of the cyanide ion ($CN^-$) and the "Carbylamine test." An ambidentate nucleophile can attack through two different atoms. The "foul smell" mentioned is a classic indicator used in chemistry laboratories to identify the formation of an isocyanide (also called carbylamine).
Step 2: Key Formulas and Approach:
The approach involves identifying the specific conditions that favor Nitrogen-attack over Carbon-attack:
$R-Cl + KCN \rightarrow R-CN$ (Nitrile).
$R-Cl + AgCN \rightarrow R-NC$ (Isocyanide).
$R-NH_2 + CHCl_3 + KOH \rightarrow R-NC$ (Isocyanide/Carbylamine).
Step 3: Detailed Explanation:
Analyze the second reaction: A primary amine (formed from the Hofmann degradation of propanamide) reacts with chloroform and alcoholic KOH. This is the Carbylamine reaction, which always produces a foul-smelling isocyanide. For an ethyl chain, the product $Z$ is Ethyl Isocyanide ($C_2H_5NC$).
Analyze the first reaction: The reaction is $C_2H_5Cl + X \rightarrow Z$. We already found that $Z$ is $C_2H_5NC$.
To obtain an isocyanide from an alkyl chloride, we must use a covalent cyanide like Silver Cyanide (AgCN).
While $KCN$ provides free cyanide ions that favor the stronger $C-C$ bond formation, the covalent $Ag-C$ bond in $AgCN$ forces the lone pair on Nitrogen to act as the nucleophile, leading to the isocyanide.
Step 4: Final Answer:
X is AgCN and Z is $C_2H_5NC$. This corresponds to option (A).