No offense intended, so please don't read into it. It sounds like your still pretty young. Take the advice of us older, more seasoned guys. Live a bit before you tie yourself down with a woman. Additionally, if your so called best friend is making advances on your girl, then he is not really your friend let alone your best friend. If this is the case, then you need to dump them both, making it perfectly clear to your buddy why you don't want to hand out with him anymore (be tack full and cool about it, no fighting, no threats, no warnings. Just calmly tell him how it is and walk away like a man). If he is truly your BF, then he will realize that no girl is worth your friendship. Sad to have to say, but if they do eventually date, he will in all likelihood lose her to some other guy down the road and when that happens, he will be back knocking on your door. IMO he is doing you a favor, if she decides to go with him or anyone else, she was not the right girl and like others have said, its better to find out now then 10 years from now when you have more skin in the game.
First and foremost, make certain your not reading more into this then there is. If what you suspect is happening, then move on. It's not the end of the world and there are plenty more fish out there. Live your life while you can and enjoy yourself before you wake up one morning looking back wishing you had. I'll take my Dear Abby cap off now. Good Luck with this.