Concept:
Carboxylic acids react with ammonia under heating to form amides.
Further, amides on treatment with:
\[
\mathrm{Br_2/KOH}
\]
undergo Hoffmann bromamide degradation to produce primary amines having one carbon atom less.
General reaction:
\[
\mathrm{RCONH_2 \xrightarrow{Br_2/KOH} RNH_2}
\]
Step 1: {Identifying compound \(R\).}
Given:
\[
\mathrm{R}
\]
has molecular formula:
\[
\mathrm{C_6H_7N}
\]
This corresponds to:
\[
\mathrm{C_6H_5NH_2}
\]
which is aniline.
Thus:
\[
R = \text{aniline}
\]
Step 2: {Finding compound \(Q\).}
In Hoffmann degradation:
\[
\mathrm{RCONH_2 \rightarrow RNH_2}
\]
If the product is aniline:
\[
\mathrm{C_6H_5NH_2}
\]
then the amide must be:
\[
\mathrm{C_6H_5CONH_2}
\]
which is benzamide.
Thus:
\[
Q = \text{benzamide}
\]
Step 3: {Finding compound \(P\).}
Benzamide is formed from benzoic acid by treatment with ammonia and heating.
Reaction:
\[
\mathrm{C_6H_5COOH \xrightarrow{NH_3,\ heat} C_6H_5CONH_2}
\]
Thus:
\[
P = \text{benzoic acid}
\]
Hence:
\[
P = \text{Benzoic acid}
\]
\[
Q = \text{Benzamide}
\]
\[
R = \text{Aniline}
\]
Therefore, correct option is:
\[
\boxed{(1)}
\]