Im sorry to hear about this all! That is so sad....
But the main thing you can do is be there for her. Talk to her, make her feel special....and enjoy every last min you have together...
It might not be who she wants(that other guy) but at least she has someone....and in the end....that will mean more to her then anything else.
What more could a friend ask for?