Let your friend attempt at going out with the girl and hope he fails :P. If he fails then let him know that you like the girl too either before you ask her out or after. If you neglect letting him know it might be kinda awkward if he sees you with the girl he failed to ask out. Jealousy may ensue.
I've sort of been in this situation before but I was friends with both of them so I just gave up on the girl and edged my friend on. The sad part is I knew my friend would fail anyways, but w/e. Bros before hoes. There's enough girls to go around.