The third one. He can safely engage in battle with the enemy. Because during the third unit's turn (if it's an ally, of course), the other two simply stand still and don't fight: they have "finished" the battle, although they can't move apart. So, he can go and fight the enemy.
He can also approach an ally and give them troops, in the regular menu that appears when your hero approaches an allied hero.
Are you kidding me??? You've been asked the same question THREE times, but what if it's NOT an ally? Give an answer, instead of saying "if it's an ally" again.