Step 1: Formation of Product A
- The Reaction: Aniline reacts with acetic anhydride in an acylation reaction. The nitrogen's lone pair attacks the carbonyl carbon of the anhydride.
- Product A: This reaction converts the primary amine into an amide, specifically forming acetanilide ($N$-phenylacetamide).
- The Purpose: This step "protects" the amine. The lone pair on the nitrogen is now involved in resonance with the adjacent carbonyl oxygen of the acetyl group. This pulls electron density away from the benzene ring, significantly reducing the ring's reactivity. It changes the group from strongly activating to only moderately activating, allowing for controlled, single substitutions in the next step.
Step 2: Formation of Product B
- The Reaction: Acetanilide (Product A) is treated with bromine ($Br_2$) in acetic acid ($CH_3COOH$) at room temperature. This is an electrophilic aromatic substitution.
- Product B: The acetamido group ($-NHCOCH_3$) is an ortho/para-directing group. Because this group is physically quite bulky, it creates steric hindrance, blocking incoming electrophiles from easily attacking the adjacent ortho positions. Therefore, the bromine attaches almost exclusively at the opposite end of the ring, making the major product p-bromoacetanilide (para-bromoacetanilide).