bad friend

Ka

hey! I have a big problem. I go to a tiny school (less then 150 students in 9th grade) and im 15. in my friend group, a specific girl (a) had a crush on another girl (b). girl b was in a relationship with a guy this entire time. however, girl a apparently wrote text messages detailing explicit sex scenes and conversations that A&B DID NOT have. these texts were built upon her personal fantasies, and she sent them to the best friend of girl A's boyfriend. naturally, the boyfriend found out, all the while girl A knew nothing. after the boyfriend was, naturally, pissed off, girl A went to B and asked her what was it she texted. girl B responded saying that it was just a fantasy, that it was weird but there was no truth to it. however, when all three of them sat down (a, b, and boyfriend) girl B didn't say anything. even after the whole talk, girl B insisted that the texts were just what she wanted to do, and they she made that clear in the texts. later, girl A saw the texts and realized that they were saying that those things had definitely happened. she felt bad and talked to her bf, and cut off girl A--both because of this whole situation and also because of how negative girl B is.

Now onto my situation. I'm in the same school, girl A is one of my first friends here, and girl B makes me feel bad. however, friends I love and care about are practically always with girl B, and it makes everybody more negative. every single drama or gossipy thing that's happened in the circle was due to girl B. girl B makes fun of my Spanish (shes Colombian, im American and learning), says that she doesnt have any opinions on anything (then says her opinion) and constantly tries to argue with me. hanging around her makes me feel worse of a person, but I cant not hang around her. we have classes together, my friends are also her friends, and i wont have anywhere to sit at lunch. it sucks. what do I do?