How did he get himself into such a mess?
How, indeed, is anyone's guess.
Transmutation? Teleportation?
Perhaps a misspoken incantation?
One should be wary when dabbling in the mystic arts. Curiosity in such matters may end in a quandry.
Please do not post spoiler pictures.