Let me take a crack at where I think things will go
Garp and sengoku along with Rayleigh were probably all former members of Sword. Ex drake a former marine turned pirate being a member semi proves that pirates can be members in sword.
Coby being capture is going to spark marines to level up since he is the modern day example that younger marines would like to follow. I can see helmeppo being made at being weak. Akainu can even spin this to get even better results from his marines training.. "the hero was captured because he was busy babysitting the lot of you on Amazon lilly" etc etc.
Behind the scenes it was actually aokiji that had tipped sword in reference to bb showing up to capture/kill boa. Hence why coby joined in the efforts to capture her before bb showed up. It's also why he wasn't shocked that bb came in the first place.
It's revealed that fight between akainu vs aokiji fight resulted in the winner being fleet admiral while the lower was made a member or leader of Sword. Since aoikiji is swords current leader and the marines lost information on him they had to send another sword member to relay info while aookiji is under deep cover. Hence why koby was their duty the rocky port incident in collaboration with bb and also why he was there again with bb trying to capture boa. He succeeded in bb being interested in him enough to want him on his crew/ship
Swords goal is the temporarily have a truce with the bb pirates so that both sword and bb can come together in taking out IMU. This makes sense since akainu doesn't like the celestial dragons neither the world government but is forced to obey their orders. So if bb were the main cause of this group falling he can place the blame on the bb pirates without getting his hands dirty. And this is what sword is trying to accomplish.
Bb however is going to betray sword and attempt using coby for other reasons. Because of this Rayleigh intervened and is actually the one that captured coby. However since the marines were all put to stone, the moment they were unstoned these events already took place so they had to rely on second hand info from the Kuja pirates telling them that bb has coby. This gives time for coby to level up with Rayleigh