Go to the Lilycove Dept. Store, and standing in front is your rival that you fight. Go back to Slateport. In the Northeast part of the town you will see a large group of people gathered. Walk up and talk to the professor and after all the dialog, fly back to Lilycove. Walk east to the shore there, use surf and go north. Go in the cave and the 2 people from team aqua won't be there to block you anymore.
Chat with our AI personalities
the third badge in sapphire is at mauville city(north of slateport city)
In Pokekon Sapphire, you get the 5th badge after defeating your opponent in a Gym Battle at Petalburgh.
in lavarage town
The fifth badge is in Sootopolis City, you need Surf, Dive, and Whirlpool to get it
Flannery's gym in Lavaridge Town.