Woah! I can't believe I missed this topic o.o
I'm assuming you've found your answer by now, but if not: you get them from both. Not just that, a Pokemon switched out in battle gains the same EVs as the one(s) that replace it, and in 2 on 2 battles all Pokemon used gain EVs from both opponents.
Someone correct me if I'm wrong, but this is what I've come to know as true.