So a few days ago, I cold-approached my first mixed-set.

The girl was studying with a guy, and I went up and basically said "This is going to nag me the whole day, but is this guy your boyfriend?". She laughed and said "No this is my study partner". So long-story short, she was single, but she said "I don't go out with random guys", but then she said "Well, can I have your Facebook to look you up?".
In hindsight, I probably should've talked a little bit more to build a bit more of a connection (I had to go with my friend to finish up an assignment), but whatever, what's done is done and whatever happens happens.
In any case, it got me thinking about two things: First, every time I was interrupting a girl, I used direct approach. I'm not talking about just getting her to remove her earphones, but if she was deeply concentrating on studying or writing a paper, I figured there's no point in BS-ing around.
The only thing I can think of would be something like "What is it that you're studying", which in hindsight, might've worked in this case, only because she seemed to be focused on it, but not too focused to the point where interrupting her would've annoyed her.
It also got me thinking: I don't have much experienced with mixed-sets. The only time I got a girl's number from a mixed-set was when a guy and two girls were sitting behind me in class, but they weren't supposed to be in that class (they were a year younger than me), so I started a conversation about that. So it was so easy that it wouldn't count for these purposes.
A lot of girls study with guys, so it got me thinking what would be the best way to approach a girl studying with a guy when this opportunity comes by again? Should I stick with what I did last time and do direct approach, or do you think there might be a better way?