Complex sentence: He returns to his regular appearance when DiZ's heart encoder explodes, purging the Heartless from Riku's heart, and he rejoins Sora to battle Xemnas, wielding his own Keyblade, the After Xemnas is defeated, the two return to the Destiny Islands together.
Split into simpler sentences: He returns to his regular appearance when DiZ's heart encoder explodes, purging the Heartless from Riku's heart. After he and Sora defeat Xemnas, the two return to the Destiny Islands together.