I believe the Blackbeard Pirates are the ones on the way to Egghead. Here's why:
We last saw Blackbeard fighting Law on Winner's Island.
Now, the people evacuated from Egghead were sent away to protect them from the seige, but, Vegapunk is smart enough to know after Ohara they'd be wanted afterwards. The solution? Send them somewhere they can be protected. Where is Vegapunk connected to that's nearby? Elbaf, since Vegapunk got the knowledge from Ohara's books thanks to the Giants that visited Ohara after its demise.
So, where is Elbaf in relation to Egghead?
In 1056, we get to see a small map and Law, Luffy, and Kid discussing which islands they're going to.
Law goes North East, to Winner's Island.
Kid goes East, to Elbaf.
Luffy goes South East, to Egghead.
This means that, coupled with the map, if the scientists were fleeing from Egghead to Elbaf, they'd sail right by Winner's Island, where Law and Blackbeard fought. So, it makes total sense for Blackbeard, Van Augur, Jesus Burgress, Doc Q, and Stronger to run into the Marine ship chasing the scientists from Egghead if they're on the way there themselves to pick up Catarina and Laffitte.