Instructions
Leave the Kanto Power Plant and head onto Route 9. There are a few trainers to battle and items to collect along the way, such as a Flash Cannon TM and a Light Clay. Continue heading west until you reach Cerulean City.
Go to the Cerulean City gym. As soon as you enter, a Rocket Grunt will bump into you and run out of the gym, telling you that he has the stolen machine part.
Exit the Cerulean City gym and head north to the Nugget Bridge on Route 24. Talk to the Rocket Grunt, who is standing between two people. He will challenge you to a battle with his Level 39 Golbat. After you defeat him, he will tell you that he hid the machine part in the Cerulean City gym.
Go back to the Cerulean City gym. Approach the stack of red and white inner tubes next to the northernmost blue umbrella and press "A" to find the stolen machine part.
Exit the Cerulean City gym and go back to the Kanto Power Plant via Route 9. Speak to the director who is standing on the platform in the middle of the room to give him the stolen machine part. The Kanto Power Plant will begin to work again and he will give you a Charge Beam TM as a reward for your efforts.