I have no idea to be honest. I think I'd be so overwhelmed by the fact that I am in Equestria I'd probably be unable to move for a few minutes. Then I'd find a way to the library without being noticed, you know, find a cardboard box and use it to get around. Then I'd go to the library and talk to Twilight. Not because she is best pony, but because all the other ponies would probably start screaming and running away. If i'm lucky I won't receive a face full of magic laser p3w p3w upon walking through the door. Assuming I am lucky, I talk to Twilight and try and find a way back home.