According to this spreadsheet, you faced Typhlosion number three.
>562 | Typhlosion3 | Modest | Choice Scarf | Eruption | Focus Blast | Heat Wave | Extrasensory | Spd/SpA
All Battle Maison Pokémon are set to lv. 50. At that level, your max speed Greninja reaches 191 speed. The Typhlosion you faced was Modest, with max Speed investment and most importantly a Choice Scarf. A Modest 252 Spe Typhlosion reaches a Speed stat of 152. Now, add the boost from Choice Scarf.
152(1.5) = 228
Typhlosion outsped you because it was holding a Choice Scarf. It's not cheating, it's cheesy AI.
Here's your Leafeon:
>519 | Leafeon2 | Naive | Liechi Berry | Leaf Blade | Giga Impact | Substitute | Yawn | Atk/Spd
Fully invested in Speed with a Naive nature (+Spe –SpD). Max Speed Leafeon reaches 161 Speed. Max Speed Mega Alakazam reaches 222 Speed. I am going to assume that an earlier Pokémon had used Sunny Day. This would activate Leafeon's Chlorophyll, which doubles its Speed stat.
161(2) = 322
With a Chlorophyll boost, Leafeon outspeeds Mega Alakazam by 100 points.