Time to use what I like to call "LOGICAL ANALYSIS"
Copy/Paste of Episode Synopsis:
When Twilight casts a spell that switches the Cutie Marks and destinies, the only way to reverse the spell is by writing her own magic.

'Switches Destinies' - Twilight's new destiny is that she is an alicorn now
'Writing her own magic' - She ****** up so bad she needs to write her own magic to fix this, which she can do, 'cuz Alicorn powers