Challenge accepted
NOTE: I EXCLUDE OPTION OF KAGUYA TAKING OVER MADARA
To beat Madara they will most likely have to:
1) Destroy the Moon or find another way to break IT
2) If They destroy Moon then Madara recreate it so destroy it again, else just attack him
3) Naruto and Sasuke will need to weaken Madara's very much
4) Tailed beasts get some freedom inside Madara so they can communicate with Naruto and answer so they will be called then they answer so they will be pulled inside Sage's tools but it get interrupted instead used just as mean to trigger pulling out tailed beasts chakra.
5) Madara will get stripped of tailed beasts chakra but still possesing Shinjuu in himself(now it would be moment for Kaguya to take over but As I said I will skip it)
6) Madara will be beat up badly then Sasuke summon Shinjuu out of Madara or Madara will get killed and Shinjuu will get released
7) Naruto found out that Shinjuu also communicate using telepathy on even deeper level like godly at which none mortal can talk.
etc.
Either way your concern was how to beat Madara so I gave you
In short main points would be:
1) stop IT
2) strip Madara of tailed beasts
3) beat/destroy Madara.