For simplicity, I will refer to the Doctors by their numbers (5 & 10).
10 is in the TARDIS, preforming some routine maintenance. He has his temporal shields down, because the maintenance seems to require it.
Because Time is less than stable relative to the Doctor, especially given he's in a TARDIS (5 & 10 both) a slight malfunction in 10's work pulls 5 forward for a short time and causes the 'Belgium' problem.
At this point, 10 realizes that this is the event he recalls from when he was 5. If he has an eidetic memory, he then acts exactly as he had seen himself act. 5 watches and hears what 10 says (which is somewhat nonsensical to us, but would make sense to the Doctor, especially given time to think it over).
10 quickly solves the 'Belgium' problem, and gets to have a heart-to-heart with his younger self, though he's careful not to give away anything too terrible. He mentions the Master, but only in passing.
If he does NOT have perfect memory, as 10 seems to indicate, 5 will have more than adequate time, given a complete overview of the steps involved to figure out the theory so that he'll be able to recreate it when the moment comes.
There is no paradox here - it is a Stable Time Loop. Granted, the information from the future only exists because it was seen in the past, but the Doctor (both 10 and 5) explains how that happened: Wibbly, Wobbly, Timey-Wimey.
Warning: All links are to TVTropes. TVTropes articles which prominently feature The Doctor. You already clicked, didn't you? You poor, damned fool.