Give her less attention than he does. This is going to be about displaying a higher social value than him. Project his and her relationship in her mind. Say after you see he's giving her attention (and when he's not around), jokingly tell her you think they'd make a cute couple. It seems counterintuitive, but by doing this you get to fly under the radar, and slip past her defenses, while simultaneously (unless she's really attracted to him) preventing a relationship from blossoming. Think about it. Say you're at work, and you're friends with a girl. You don't find her sexually attractive, but you enjoy talking to her. Now say someone jokingly says you two like each other (b/c you find yourself talking to her a lot), it'll make you want to stop talking to that girl even though you think she's nice, because you don't want other people thinking you find her attractive, or that you'd date her. It's the same concept at play here. Also, you'll want to project the two of you dating in a joking sense. Pretend like the two of them are already dating, and say, "You and John make such a cute couple. And it's too bad I like him, otherwise I'd take you to a tropical island and we'd sip pina coladas all week long naked on the beach. But he's such a nice guy, I could never do that to him." You're displaying confidence by inferring you COULD have her if you wanted (Alpha), but, this (Beta) John guy is what's stopping you, b/c you sarcastically care about his feelings. Then just play it cool, jokingly make it seem like you can't date her. When you tell someone they can't have something, it makes them want it more. While he's directly pursuing her, you're indirectly pursuing her through subliminal psychological means, which she'll subconsciously act upon. Employ these tactics throughout your classes together.