It doesn't truly matter which order you do it in, however I prefer to start with maxing out any stats I want 252 EVs in. As each stat can only have a max 252 EVs, this makes it pretty easy not to screw up and give it too many (just keep count so you know when it's maxed out). Therefore, when you've maxed out your two stats at 252 EVs each, you can train your Pokemon for whichever stat you want your remaining EVs to be left in without needing to keep track.
In summary: train for 252 EVs first.