Iris will stay behind to go to the Dragon Village and report to the elder
Cilan will go back to his cafe and do shit with them
Ash will return home then start his journey to XY
Then at least one of Ash's former companions (Brock, Misty, Tracey, May, Max, Dawn, Cilan or Iris) will intercept him, ask him where he's going and accompany him part/all of the way there.
If they accompany him all of the way there, we get to watch a whole 2 seasons of Ash+companion in XY. If they leave before XY, we get a new companion for 2 seasons.