Complex sentence: Amin rubs the lamp, and a genie comes out, about to grant his wish to see his mother, but he takes them both to Jafar's palace to face Burk one last time.
Split into simpler sentences: Amin rubs the lamp, and a genie comes out. Amin wishes to see his mother, but first, the genie takes them both to Jafar's palace to face Burk one last time.