(a) She used silver cyanide (AgCN) instead of potassium cyanide (KCN). The foul-smelling product is the isocyanide (isonitrile), CH3CH2CH2–N≡C, 1-isocyanopropane, which is an isomer of butanenitrile (C4H7N).
CH3CH2CH2Br+KCN→CH3CH2CH2–C≡N+KBr
CH3CH2CH2Br+AgCN→CH3CH2CH2–N≡C+AgBr

(b) The cyanide group is an ambident nucleophile. It is a hybrid of :C−≡N: and :C=N:−, so it can bond through either carbon or nitrogen.
- KCN is predominantly ionic and provides free CN− ions. Both C and N could donate a pair, but attack takes place mainly through carbon, because the C–C bond formed is more stable than a C–N bond. The product is the alkyl cyanide (nitrile).
- AgCN is mainly covalent (Ag–C bonded). Only the lone pair on nitrogen is free to donate, so N attacks the alkyl carbon, and the product is the isocyanide.