The traveller is assuming, reasonably, that his third wish is reversing the amnesiac effects of his second.
I don’t think this follows from the text. The hag tells him “but second wish was for me to return everything to the way it was before you had made your first wish. That’s why you remember nothing; because everything is the way it was before you made any wishes”.
So she told him that he had been an amnesiac before any wishes were granted. Therefore he should have already guessed that his first wish was to know who he was—and that this proved a bad idea, since his second wish was to reverse the first.
I don’t think this follows from the text. The hag tells him “but second wish was for me to return everything to the way it was before you had made your first wish. That’s why you remember nothing; because everything is the way it was before you made any wishes”.
So she told him that he had been an amnesiac before any wishes were granted. Therefore he should have already guessed that his first wish was to know who he was—and that this proved a bad idea, since his second wish was to reverse the first.