Mega Alakazam (Timid) vs Espeon
Just watch
https://www.youtube.com/watch?v=scVEA5jjB-8
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.
Source: experience