Chapter 2: Dewford Gym
Exit the Rustboro Gym for a brief dialog with Team Aqua and the researcher from earlier. Follow them and help the researcher. Head east to Route 116 and continue following the path. You will eventually come to a cave. Enter it to find Rusturf Tunnel. Travel through the tunnel to find a Team Aqua member. Battle him and acquire the Devon Parts and save the trainers Pokemon.
Now head back to Rustboro City and talk with the research on the west side. He will give you a Great Ball and take you to speak with the Devon Corporation President. The President will give you a Letter. Exit the Devon Corporation to find Brendan/May. Speak with him and now head south to Route 104. Continue south and go through the Petalburg Woods.
Continue going south until you find Mr. Briney’s Cottage. Speak with Mr. Briney and sail off to Dewford Town. Now head to the Dewford Gym for the next challenge of the game. Battle the line of trainers to reach the Gym Leader. Be sure to stand on the switches if you get lost or cannot find the path. Once at the end of the path – the Gym Leader awaits.
Gym #2 Dewford Gym - Leader Brawly
Dewford Gym is an actual gym, complete with exercise equipment. There's three trainers to battle before the leader, after each one you'll need to step on a switch illuminating your path forward. Try and memorize the path will you still have light and then make your way through the dark. Fighting type is this gym's speciality, so a strong Flying like Taillow or Psychic like Ralts will lead you to victory with ease. Ralts is an especially good choice because it will learn Disarming Voice at lvl 11 which will be super effective against Meditite as well. If Makuhita drops to low health Brawley will use potions to restore it; hit him heavy so he doesn't have a chance.
Once defeated, Brawley will award you with the Knuckle Badge and TM08 - Bulk Up. You'll now be able to use Flash outside of battle and Pokémon up to Lv. 30 will obey you.