Your friend is locked in with a hot girl, and her ugly friend is bored/cock blocking.
Now you and your friend both know for GOT DAMN sure he owes you one for this. At some point though, you may find yourself at a bridge. The bridge called "Do I really have to hook up with her?". This is the transition from "handling" a cock block, and taking one for the team. Taking one all smelly, sweaty night long.
Remember this: It is OK to tell your buddy he's on his own. There are plenty of women in the world. You don't have to sacrifice your penis. Just keep in mind that someday the cheerleader may be on the other foot.
Here's a handy guide to what types of girl you should man up and help your buddy out with, and which ones you can say "Sorry bro, I love you, but I've got to go."