IF kakashi and rin went back to dig up obito body to give him a proper burial and relized his body was not there.
Than they would start a search party and when obito came out he could have been here i am.
Than could have told the 4th where he was and who was down there and than obito could have went back with one of the 4th kunai amd than he could have gone in killed madara and ended everything right there.
But rin and kakashi are not good friends so thats why there this war!!
Moral of this story is to be a better friend!