It is given that compound ‘C’ having the molecular formula, C6H7N is formed by heating
compound ‘B’ with Br2 and KOH. This is a Hoffmann bromamide degradation reaction.
Therefore, compound ‘B’ is an amide and compound ‘C’ is an amine. The only amine having the molecular formula, C6H7N is aniline, (C6H5NH2).

Therefore, compound ‘B’ (from which ’C’ is formed) must be benzamide, (C6H5CONH2).

Further, benzamide is formed by heating compound ‘A’ with aqueous ammonia. Therefore, compound ‘A’ must be benzoic acid.

The given reactions can be explained with the help of the following equations:
