I can’t imagine that anyone who is intellectually honest would not recognize that as things stand today in our society a white person who does well in school is likely to be more successful in societal terms than a person of color who is doing very badly in school unless that person has some other strong talent. (Of course there are exceptions. There are always exceptions.) In addition to the problems faced by ANY kid who is a poor student, white or black, white privilege is all too real. As for her presence in this particular class, the OP indicated that this was generally regarded as a low level class that was full of kids who needed to scrape a passing grade in a science. A student who otherwise is in honors and AP classes is apparently a rarity. The rest of the kids probably have no idea why she is there. It sounds like he may resent her presence. In high schools kids know who is generally in which kind of class, and expect them to stay there. HS kids are far too likely to consign each other to groups than other people, in my experience.
Do I approve of any of this, or condone it? Of course not.
My daughter has faced similar situations though mostly with gender overtones rather than racial. She deals with them pretty successfully using her big sister skills. She has described it to me like this. I called up my old crone persona, looked him in the eyes, projecting disappointment with his behavior and sadness that he felt he needed to protect himself that way, then kindly said “Next time you want my help, just ask me.” Then I treated him as if he were the person I thought he could be and gave positive reinforcement. That usually does the trick for her, in a school environment.
“Slumming” is an old expression that doesn’t have any racial content. There have been slums of all descriptions, occupied by all sorts of people. It refers, usually ironically, to a person spending time with those in a lower social position. in this case, he might ask himself, “What the hell is this girl who is in the honors/AP crowd doing slumming it in this class? She doesn’t belong here.” Similarly, a kid in a third-string basketball team might ask, if he showed up to play, “What is he doing, slumming it here with us?”