The flying Bijuu that stayed back fires a TBB while Gaara's using Sand Tsunami to kill him and probably the other Kages, while the about-to-be-sealed Jins power back up to stop the sealing from happening and also hit TBBs at the Kages.
Yagura deflects any Jinton back at Onoki, and Super Jinton isn't hitting them if they keep a decent distance. The flying Bijuu doesn't get hit by Super Jinton regardless. And in the case that the Bijuus do lose (Edo Jins can still fight unless they pull out the stakes), Tobi brings them back into Gedo Mazo and proceeds to dominate them:
Gado Mazo
You must be registered for see links
to send them all flying, follows up with
You must be registered for see links
and finishes them off by
You must be registered for see links
if they're somehow still alive. Kages have no way of defeating Gedo Mazo, let alone dealing with Tobi once they all have almost no chakra left (if they somehow beat Gedo Mazo).