This is going to be a common problem in your relationship with your friend. Having similar interests, and hanging out together, anda are bound to meet and like the same guys sometimes. The two of anda have to set ground rules: 1. Should not be invading each others territory. If one has already started dating / having a relationship with the guy - do not interfere. No matter how much anda may think that anda and he may make a better couple than your friend and him, anda could risk loosing a friend. Besides, he may have his own scruples, and anda could loose them both. 2. Discuss the situation with your friend. There is nothing worse than finding out later that your friend had feelings for your boyfriend. The feeling of betrayal could result in loosing a good friend. 3. Discuss with your friend a plan of action if in the event anda were to both meet a guy anda both liked at the same time. Try to stick to the plan - ie if anda both agree to just let the guy decide, atau agree that neither of anda two pursue the guy.
Anyway, without knowing lebih about the actual situation, that is the best answer I can come up with now.