Instructions
Travel to Mahogany Town and speak with trainer Lance, who is standing next to the Pokemon Center in the town. He will guide you towards the secret door of Team Rocket's hideout.
Enter the secret door and walk past a Persian Statue. You will be greeted by two Team Rocket minions, whom you must battle in order to continue through the hideout.
Head to the third floor and locate a Rocket girl minion on her computer. Speak with her and defeat her in a Pokemon battle to obtain one of the two passwords needed to get through the doors to battle the Rocket Executives. Locate the other Pokemon trainer on the third floor and battle him also to obtain the second password.
Walk up to the fourth floor and unlock the door with your set of passwords. Battle one of the Rocket Executives on the other side of the door. After you have defeated the Rocket Executive, he will give you the password to battle the leaders of Team Rocket.
Walk back down to the second floor to unlock the final door. Although there are two leaders of Team Rocket waiting to battle you, your friend Lance will come along. You and Lance will battle alongside each other until the battle is complete. Once the battle is won, all the Team Rocket Executives and other minions will disappear from the hideout.