You talk to your amigo that you have plans to court her. There is this guy code that you should follow. I mean if u are not friends with him like he is a stranger to you, fine by all means court the girl. But TS, respecto lang sa guy and basin ang girl that you like is making pakipot and starting to fall for him.
Second,Ask the girl nonchalantly what's going on with her and your friend. Then you'll know what's the next move. If they are not dating anymore and they are good as friends, that's the time you make a move. Good luck!