Walkthrough: The following day after battling the Ultra Beasts on Poni Island, Sophocles will come to your house needing assistance. He will seek your battling skills, as Festival Plaza has been taken over by a mysterious group. As you arrive in Festival Plaza, you will come to find that Team Rocket has taken over Festival Plaza under the new name of Team Rainbow Rocket.
Sophocles will quickly discover that his security system has been breached, and he'll need you to defeat the Team Rainbow Rocket Grunts in Festival Plaza Castle to buy him some time to fixing it. However, he won't have any idea how to do that since you will be prevented from using your own Pokemon. After talking with the Grunts, the two of you will realize you will need to use the Battle Agency to acquire Pokemon to defeat them. By doing that very thing, Sophocles will regain control of the security system, forcing Team Rainbow Rocket out. After helping him, you will return home.