Just for a heads up, you liking the same guy isn't anyone's fault, so keep a clear mind about this. Don't get all jealous about it, because you two couldn't help feeling the way you do. But an important distinction is that however, the decisions that may come afterwards could possibly be one or both of your faults. So decide wisely.
The most obvious but probably one of hardest things to do in this type of situation is to just move on. I know that you really like him, but is this guy worth you and your best friend getting into odds? Is it really worth your time to get into a love triangle that is bound to have drama going on? Unless you're really into that, then the best solution is to simply walk away. Although it may not come easy, it does show that you are a mature person and that you value your friendship, which is probably worth more and last longer than any kind of relationship.
If that's not what you want to do, then I suggest trying to figure out how much do you actually like this guy. Do you both really like each other? Are you two into the same things/have same goals? Do you like him because of who he is? Try to consider those and decide whether he's really the guy you want. Also look into what kind of guy he is. Is he the kind of guy you really want to spend time with? Is he a flirt? Is he trustworthy? I know that these seem kind of long term, but if your friendship is on the line, you need to consider a lot of deeper aspects. Like I said before, friendships usually last longer, hence they should be valued more. You don't want to do anything brash to ruin this friendship, so be sure to think things through!
If you don't want to back down against your friend for this guy's heart, then just wait for the guy to make more moves. You said that he asked you out yet you are still confused. So wait for him to do something more. If he decides to like you and you tried talking to your friend about it, but she won't accept it, then her feeling that way is her own fault. You both were stubborn and wanted to do this the hard way. Just be aware that the end of your friendship can possibly be the price you pay for playing it that way. If she ends up being the one who steps down and/or accepts it, then that was her being the mature one and, in return, you should also be mature by not flaunting your victory in her face. On the other hand, if he ends up making a move on your friend, you be the mature one and accept it. People can't help the way they feel and you should respect that. Although they might not be the way you wanted it to be, it is out of your control and getting mad or sad or jealous isn't going to do you any good. In fact, it'll probably ruin your friendship.
You now have three options. Either shut down your feelings right away, think really deep through it and make a rational decision, or go for it all but possibly put your friendship on the chopping block. I'm not going to tell you what to do because this is a situation that requires your judgment. You know how things are right now in your life better than I do, thus you are the ideal person to call the shots in your own life. I'm just giving you suggestions on what you can do. With all that said, the choice is yours and good luck.