isn't that this episode too though?
Maybe they get it on within the next two eps (12 or 13) and then He goes to reconcile with Karen since she has already chosen to go to Boston over Dev and when he gets to grand central station he runs up to karen to make things better and she is standing there with ivy and SHIT GOES DOWN. and that's how he meets ivy, and puts the two together.
So he tries to reconcile with Karen twice?

He wad def in the train station when they were filming those scenes.
A lot has to happen in 13 for this to happen

Karen and Dev need to split. Derek neefs to get it on with Rebecca, and Ivy find out. Both drunk ivy and Dev need to meet and shag. Then they need to get to train station.