Mega Alakazam (Timid) vs Espeon
That is completely possible. Speed stat change doesn't apply during the turn the stat changes. Example: if paralyzed in a double battle, a Pokemon that becomes paralyzed will move in sequence during the turn it becomes afflicted. The queue is calculated when all moves are locked in.