Wow, sounds similar to what happened to me. The guy I was with a few months ago was well I dunno but anyways my best friend started talking to him as 'friends'. She started liking him but of course she wouldn't tell me that because I loved him. Well, she started telling him lies about me and me lies about him & finally I just got so sick & tired of it that I told my best friend to f*c* off & stayed with my bf, that lasted a few days & we talked again. The guy and I broke up, he only talked to me a few times a month & bam him & her are talking. Ya know i'm not dumb lol I figured out she was talking to him a few days ago at my house & the next evening and I heard her say she loved him. I was pissed so I threw our whole friendship away and decided to talk to this guy myself so I did. He promised me he wasn't with her & he wouldn't talk to her anymore because he still loved me. Do I believe that? I dunno but I know he hasn't talked to her for a week or so now.
Anyways, back to you. I would seriously think about what you're doing before you loose a friend and a girl you have a lot of feelings for. Think what is more worth it. Your friend or a girl that is your friends girlfriend. I know you have to be in a tough situation. Talk to the girl and if you 2 decide you really want to be together then go to the guy & explain the situation to him. Just remember, he's going to get his heart broken.
Hope I helped <3