You have to beat the Elite four first.
After beating the elite 4 you can challenge them to a battle.
After beating the elite four and getting the national dex.
inside a cave that team rocket is at
they are at the right side of the begining of mt ember
Just get the national dex go to mt ember you will find 2 team rocket grunts battle them and go in the cae and you will find the ruby in the cave
you need to push them out of the way and they will battle you just give it a try youll see.......
the mountain with moltres on it Mt. Ember i think after you beat elite 4 go there and you should see some team rocket people battle them then go in the cave by them
first you need to beat the Pokemon league , then you go north of mt. ember and battle two rocket grunts
In order to double team you. -pokeman
You can battle Team Rocket at the Goldenrod Radio Tower after you get the Gym Badge from Mahogany Town.
If your talking about the password for the rocket hideout you get the first one on mt ember where those two team rocket grunts are.
when you go in mt ember you will see a guy /hiker go right and you will see them but can only do it after you have defeated the elite 4