Revive hamura so he can be given further background and help fight against kaguya so it'd technically be hagoromo and hamura vs kaguya. But hamura in the end gives his power split to Naruto and sasuke. Or use Edo tensei on hagoromo so hagoromo can revive himself than hagoromo will call and obtain all his ninja tools and open one of the gourds and reveal that hamura was inside the whole time than hagoromo revives himself. And gives the ninja tools to hanura revealing they are hamura's all along than the neither's go into the other dimension and a family reunion ensures if course before that they tell the kage's how to save everyone from IT.
This or hagoromo has Edo yensei used on him and revuves all the kages and teaches them how to free everyone from IT, when they finish he brings them into the dimension with kaguya and a battle ensures