Madara's attacks are relatively slow so I don't know how he can even hit space time users. Tobi can just teleport him away while Minato places seals everywhere and confuses Madara.
In the end Tobi can probably solo as I don't know how he can counter Tobi's space time and intangibility.
all tobi needs to do is hold off/distract madara till minato is finished preparing death god. this is accompllished by hiding behind gedo mazos leg. minato removes madaras soul. tobi laughs.