Benzonitrile can be prepared from benzaldehyde on treatment with NH2OH followed by dehydration with acetic anhydride. This reaction occur via Beckmann rearrangement.
For benzonitrile formation, the key step is a hydride shift followed by deprotonation of nitrogen that ultimately gives benzonitrile