You over-analyse.
She says she have to study, it is near mid-term. Some people do their thing at the last minute and they have to do it, plus she probably have a job to pay her appartement, etc. She mights be busy, do not think too much far. You might think she get an easy 2 hours because you have it. Chance are you are wrong.
She mights want to be with her friend to not be alone with you, or maybe she wants that because she want to enjoy you both on her limited time. Think with optimistic flow in your brain... take the second option. Her friend is there? Aim for a 3some! Say something cool like COOL, 2 chicks rather than 1! And it won't always be that way... and personally I won't like a girl that just dump their friend right there just because someone wanna get personal... especially if it not something life-crucial.
If you also get to make her friend like your side, chance are it will just help your overall perception.
Chick you want: Oh how you find him
Chick 2: he is coolio, he is cute and he is mad funny, I was so much laughing when he said that and that...
Chick you want: I think he has an eye on me but I am not sure
Chick 2: go for it, he seems like a cool boy!
Beside think negatively... take all opportunity to your advantage. There is not only one way to go in life and you have to be the best in the situation that is given to you.
Conclusion: sometime there is stuff that is constant and you can't change them. rather take advantage of the part you can control and try to take advante of the thing that are constant that you can't change.