Chemoselectivity in synthesis of paracetamol
The reaction is likely with one equivalent of acetic anhydride and under thermodynamic control.

Kinetically, the nucleophilic attack of phenol on acetic anhydride should be a lot faster than that of aniline. Aniline’s lone pair is taking part in resonance across the phenyl ring so it is barely able to attack. Phenol has two lone pairs on oxygen, though, of which only one is able to resonate with the aromatic system. Under kinetic control I would thus expect acylation on oxygen.

However, there is a second process which renders us thermodynamic control: The initial product can react with a second molecule in a transacylation reaction.

$$\ce{RHN-C6H4-OAc + H2N-C6H4-OR &lt;=&gt;&gt; RHN-C6H4-OH + HAcN-C6H4-OR}$$

Both the oxygen of a free phenol and the nitrogen of a free aniline (the latter slower, but still) can attack a corresponding acylated atom. In overall thermodynamic stability, the acetylamine is more stable than the acetate (and is also kinetically more inert) so after equilibration has taken place the acetamide will prevail.