The Fifth Doctor's memories of the event were blocked, and the Tenth Doctor only remembered it when the cloister bell rang, triggering recognition.
There are also many other explanations that weren't given in-universe, but are plausible:
- Also, time can be rewritten, so this meeting may not have occured in the Tenth Doctor's past until it happened for him as the Tenth Doctor.
- The Doctor didn't know WHICH Doctor the Tenth was when he met him as the Fifth, so he didn't know when he'd look like that. Not to mention that he doesn't look in mirrors often, as evidenced by the 9th's reaction to his new appearance at the beginning of Rose. Even then, by the time you've changed your face nine times and met yourself a lot, it'd get kind of old looking in the mirror and going, "Oh, yeah, I've seen this face before!"
- The TV series hints (and the novels confirm) that Time Lords sometimes edit out their memories, because it's too hard to keep track of thousands of years of trivia.
- The Fifth Doctor, like the Fourth, Seventh, Eighth, and Tenth, had some level of regeneration amnesia and other related problems. (And in the novels, the Eighth Doctor had much more severe amnesia, and his past was altered repeatedly, so who knows what memories were left by the time of the new series.)
All past multi-Doctor stories have led to similar questions, and the answers given in the series have been vague at best. The novel Cold Fusion offers a number of explanations, all of which are (deliberate) gibberish.
Since multi-Doctor meetings only happen in extreme accidents that tie spacetime in a knot, or under the direction of a team of Time Lords and technicians (or, maybe, in the middle of an Eastenders episode), the mechanics are probably too hard to explain in terms of human understanding of temporal physics (meaning they're whatever is convenient for the writers).