Mel meets the sixth Doctor, travelling on his own. They have various adventures, including the Vervoid story shown in Trial of a Timelord. At some point after this, and whilst still travelling with the Doctor, she is 'abducted' by the Master's pod. After the events of Trial of a Timelord, the Doctor returns her to her previous position in time, where she is welcomed back by 'her' Doctor, who knows exactly what has happened, as all these events for him are in the past.
From the Doctor's point of view, having taken Mel back to her correct point in space and time, he continues his solo journeys (perhaps visiting Peri to check on her health), knowing that at some stage he will meet Mel for the first time. Perhaps on their first meeting she is surprised by how much he knows about her.
It is unlikely, however, that the CIA would allow the Doctor to keep his knowledge of the events surrounding the Vervoids. Now the CIA have the powers of the High Council they can effectively wipe the Doctor's mind at any time (via the telepathic circuits seen in The Deadly Assassin), which they do before the adventure takes place.