You need to understand something in organic chemistry. Not every question is going to be part of some named reaction that you just have to apply. For example in this question, the basic concepts of organic chemistry is used nothing more.

First step, you look at the molecule and think, hmmm what can H+ do? There are two possible things: 1.The nitrogen could take it forming nh3+ but see that this does not lead anywhere that is you cannot proceed.(also the nitrogen is right next to the carbonyl so the carbocation will also not be stable)Note that protonating the OH group also leads to nothing.

2.The lone pair on the oxygen(of carbonyl) takes up the H+, forming a postive charge on it and this is a no-no as oxygen wants electron. So the double bond shifts onto the oxygen to form the OH group but this forms a positive carbocation and then... we see that an intramolecular attack can take place from the OH on the other side(O has lone pair of elecrons!!) forming a five membered ring! 

Then as mentioned in your diagram, an intramolecular proton exchange so as to quench oxygen's +ve charge.(standard acid base reaction).Now from this part, see that we can regain the lost carbonyl group by opening up the formed ring, rearrangement.(bond energy of carbonyl group is high). That's it!!