This is how
Riku and Cody made it to the temple and they saw Sensei Wu surrounded by Dream Eater, so they defeated them]
Sensei: Thank you for saving me.
Riku: No problems, I'm Riku and this is Cody.
Sensei Wu: Honour to meet you.
Riku: So what happened here?
Sensei: Monsters, I send all my Ninjas to defeated them, and I have to take care of temple until you have arrived.
Cody: I see, should we go help you find them?
Sensei: Well, okay, let's go.
They went off and they saw the Giant Dream Eater captured the Ninjas
Riku: Guess, we have to save them, Cody.
They are fighting it and they defeated it
Sensei: Thank you for saving the Ninjas.
Cody: No Problems.
Riku: If there's any trouble, we'll be there.
Sensei: Okay. Good luck.
Riku: Looks like they always have a team to help.
?????: I'm sure you will.
They saw Rothbart
Rothbart: Now me?
Cody: Rothbart!? How did you got out of your world?
Rothbart: You can't keep away from the darkness, Cody and Riku. Someday, Ansem and Mal will get hold of you. And when my friend, Ryvine Sparkle returns, everything Odette's father own, everything Odette's father love, will be mine.
(He left to the Portal when they sealed the Keyhole)
Cody: Mal is Ryvine's Ansem?