Points to note:
i. In the first step, the -NH2
takes the most acidic proton - where the resultant anion can
be stabilised both by the N+ and by the phenyl ring
(see here for
the resonance stabilisation of benzylic anions).
ii.From this anion no rearrangement can occur - however,
step 2 shows a small equilibrium that is present and as the
anion on the right goes through with the rearrangement, the
eqm is pulled through until all the compound has rearranged.
iii. The tautomerism labelled
in step 4 will occur because the ring is returned its aromaticity
- energetically favourable.