MAybe During the third ninja war madara spots obito trying to fight off the enemies and sees his uchiha crest and witnesses him "die" with honor for his comrades... HE then saves him and takes him as an apprentice...
Then he and obito are walking past nagato(before his parents die) and notices he was a blind kid or something(some ailment) he then has obito use some medical ninjutsu to transplant his eyes(maybe madara was dying or something...
Then Obito posing as madara tekes nagato as his subordinate because nagato owes him or something...
I was bored so i was thinking about it
Then he and obito are walking past nagato(before his parents die) and notices he was a blind kid or something(some ailment) he then has obito use some medical ninjutsu to transplant his eyes(maybe madara was dying or something...
Then Obito posing as madara tekes nagato as his subordinate because nagato owes him or something...
I was bored so i was thinking about it