Instructions
Travel to Cinnabar Island. Go around the Pokemon Center and the store. Head north and enter the Pokemon Mansion.
Go up the first two flights of stairs. On the third floor, examine the statue on the right. A door opens. Head south to go through this door.
Jump down and enter the basement via the staircase. Examine each of the statues to make the key appear. Exit the mansion.
Go to the right side of the island and open the gym's door. Speak to the first trainer and answer "Yes" to avoid battling him.
Answer "No" when the next three trainers ask you questions. Tell the sixth trainer "Yes" and the final trainer "No." Approach Blaine, who stands at the back of the room, to fight him.