He's using the magic he knows. He's believing.

Honestly, I wouldn't be mad if we got a The Magicks of Megas-tu prequel even if it breaks a bunch of canon and they use a convenient memory wipe to solve all the problems, mostly because it would involve TAS getting any canon recognition whatsoever.