Short term memory allows you to remember something for some seconds up to a small amount of minutes. It decays over time at a much faster rate than our long term memory, in the case that we don't recall...
If we want to learn something so that we remember it for a longer time, it is important that we associate it with things we know or that we recall it often so that we don't forget it. Yet another trick is that "chunking" too long words or numbers into sub parts, preferably of length
4179428329 is easier to remember as
417 942 8329 (chunked, association - telephone number)
01021768 is easier to remember as
01 02 1768 (chunked, associaton - day month year)
Huzsundncov Woomi is easier to remember as
Huz sund ncov, Woo mi (chunked, syllables)
By recalling our memories, and recapitulating on the longer run, we remember things.
Note how the short term memory, the first minutes, only increases because we keep recalling it. In the long term memory, the rest of our time span, we see on the learning curve that recalling it after certain time periods will help us remember things.
So, don't just hear his name X, but recall it by saying "Goodbye X" at the end of the conversation and perhaps you think about it once more on transit. Well, you might need to recall less/more often and less/more attempts for the memory to survive; your mileage may vary...
If you meet him often, you will get chances to recall his name every time you talk to him. But if you haven't seem him for months to years, forgetting his name if he hasn't been a (good) friend of you is normal as we haven't recalled it in all that time. No, you don't necessarily have to plan on recalling him at home, the best you can do is write his name in your phone book...
My post is not all inclusive at all, I gave the basics as a start. You can read more tips, check out Fitness & Nitrution to improve your physical condition which might benefit your health and memory, as well as look online for memory exercises and games (perhaps, something as simple as matching pairs of cards).