The TARDIS does have scanners for that kind of thing, you know
As for the meeting himself and how that works...well, I suggest you watch the mini-episode "Time Crash" and pay attention during "The Day of the Doctor"
"You remembered being me watching you doing that? You only knew what to do because I saw you do it."
It's not something you should think too hard about
Another mind screw is the Series 5 Finale
"Hello, I'm the Doctor from the future. Use my sonic screwdriver to get me out of the Pandoria so we can put your dead wife inside, which will hold her for 2000 years until your wife's seven-year-old self touches it and revives her. Make sense? No? Too bad, it's show time."