This is how Thunderwing's defeat goes in My Little Pony Transformers Prime: Optimus' Kingdom.
[The Autobots prepare to open the box]
Optimus Prime: Together! I think we have to do this together!
[They do and gain Rainbow Power]
[They float up to where Thunderwing is. Thunderwing tries to blast them, but they are resistant]
Thunderwing: How is this possible?! You have no magic!
Optimus Prime: You're wrong, Thunderwing! I may have given you my Alicorn magic, but I carry within me the most powerful magic of all!
[They blast Thunderwing with their Rainbow Power. Thunderwing feels all the magic he stole being stripped away from him]
[Thunderwing finds himself in a cage, with Cerberus guarding the path out of Tartarus]
[The Autobots then return the magic to every pony. Optimus and Bumblebee return the Unicorn magic to the Unicorns, Arcee and Ratchet return the Pegasus magic to the Pegasi, and Bulkhead and Smokescreen return the Earth Pony magic to the Earth Ponies, while the Alicorn magic returns to Celestia, Luna, Cadance, and Twilight and their cutie marks return]