What should you do if you liked a guy before your best friend began to like him but she told you that she liked him before you could tell her?

Although I know this is never going to happen between you and your friend the logical thing to do would be for both of you to forget this guy. Friendships aren't worth losing over a guy (or vice-versa for young guys and a girl.) Consider this a lesson in life regarding communication skills. I am surprised that you haven't told your friend you liked this guy and it leads me to believe she has pulled this off on you before so you've decided to keep your interest in this guy a secret. He's free, you're free and so is your friend, so, if he hasn't asked you out ask him out! If your friend keeps falling for the same guys you do then she has a psychological problem and should be out with friends and finding her own boyfriends. You have to make the decision about your friendship. If she's OK and you both just happen to like the same guy you have two choices #1 you go after the guy and the best girl wins or, #2 both of you forget this guy and retain your friendship. If she's always falling for the same guy it's time to start communicating your true feelings towards your friend and try to work something out or walk away from the friendship.