Aniline reacts with acetic anhydride to give acetanilide. The acetic acid part is removed and N-acylation takes place by nucleophilic substitution reaction.
Acetanilide is brominated with bromine/acetic acid. As −NHCOCH3 is ortho/para directing group (since lone pair on N activates the ring). Bromine attached to para position is the major product losse.