The man learnt him to swim

It can be corrected differently, Sergey. This is a constant problem.
Sometimes what we understand to have been said isn’t what the writer meant to say.

However, this particular sentence cannot be corrected in the way you suggest for the reasons I have given.