as the title says, i think that Naruto or Kakashi will use their talk-no-jutsu on Obito and he will change his heart...
Obito will help the Shinobi Alliance to seal Madara...
I don´t think that matters right now... Obito´s goal is to make a dreamworld for Rin herself, where he is alive and live in peace. Obito will surely be taken off guard if Rin suddenly stands in front of him trying to convince him to stop what he´s doing.
Perhaps the shinobi army will come to hold off Madara while they deal with Obito first... but I think that Madara could kill them all in 2 seconds if he wanted to :/