A student prepares a nitrile by reacting 1-bromopropane with potassium cyanide in ethanol and heating the mixture. The nitrile is then hydrolysed with dilute aqueous sodium hydroxide followed by acidification, producing a carboxylic acid.
Explain the steps involved in this preparation and in the hydrolysis, including the conditions and the functional group changes that occur.