Hmm...BLIM, next time if you like a girl...keep it to yourself.
If you like her, then you should take the initiative to go after
her. My guess is you probably took too much time to go after her at
your own pace. Another reason is probably the girl herself is
actually interested in your friend and the both of them are
mutually attracted to each other. Good friends and
girl-that-you-like simply don't mix, and friendship and love are
both entirely different things. Say if you like this girl and your
best friend is also interested in her, will you give her up just
because your best friend openly declared his interest in her to
you? The answer is no, because you fight for your own happiness and
so does your best friend. And if you really like the girl, wouldn't
you feel much better/assure if she hooks up with your best friend
rather than other strangers whose character credibility is a huge
question mark?
You are probably feeling more sour from the fact that you didn't
win her heart rather than the ''betrayal'' which comes from your
friend. And your friend is actually not even close to you...so he
has no obligations in whatever way to step aside and open up a
freeway for you to go after the girl that he might also be
interested in.
If you find somebody that you really like in the future, make haste
because you don't get this kind of feelings often and once you
missed her, you will never know when you might meet another girl
that you really like again.
Good luck. 