This is before Jamie's departure in The War Games but yet he knows all about the Timelords in this.
The subsequent theory about this (and The Five Doctors, where the Second Doctor was alone) was that the Doctor was actually used on a number of missions by the CIA before being regenerated, and that on this occasion he was given back a brainwashed Jamie, who thought it was much earlier, as a companion.
On the other hand, it was probably just a mistake