Hey BBC! Use this plot for the Doctor Who 50th Anniversary special and I'll love you forever!
The 11th Doctor and Clara land 300 years and 300 light years off target and end up in the Scottish Highlands in 1800. They run into an elderly Jamie McCrimmon, who, of course, doesn't remember anything about The Doctor. Clara convinces him that he has to do something about restoring Jamie's memory. He decides to take him to a space station where a well known team of biological researchers that specialize in the humanoid central nervous system do their work.
The 10th Doctor and Donna Noble, while trying to get to the planet Barcelona (or the Eye of Orion), land on Earth in the early 22nd century. They run into an elderly Zoe Heriot, who also doesn't remember anything about The Doctor. Donna convinces him that they have to do something about restoring Zoe's memory so they go to the same space station that 11 went to.
The TARDIS merges with the other TARDIS. Not knowing what to do, the control room reverts to the standard Type 40 pattern with no modifications. Once they get over the shock of meeting, The Doctors step out of the TARDIS to find the researchers and repair the memories of the early companions.
A mysterious woman (Tamsin Greig would be great) is present for both procedures. She is referred to as the head of the center. While Jamie and Zoe are recovering, she traps both Doctors and takes their sonic screwdrivers. She reveals herself as The Rani. She intends to use the imprint of the Time Lords that she found on the minds of Jamie and Zoe combined with the TARDIS that was used to set the time lock to release Gallifrey back into the universe.
Clara and Donna have to work together to release both Doctors, which does not go well because Donna is very bossy. While they do this, The Rani uses the TARDIS, which she calls primitive, to release Gallifrey. Rassilon beams over to the station to thank The Rani and to declare that the station will be destroyed in order to make sure that the Daleks don't use it to gain knowledge that they could use against the Time Lords. He calls upon The Master to plan the destruction.
The Doctors have to put Gallifrey back in the time lock. An original Type 40 TARDIS can't do this. They have to separate the TARDIS from itself and restore the modern control rooms. They somehow manage this (I'll leave this part to the writers or fill it in if I ever write a fan fic) without using the sonic screwdrivers.
The Castellan Guard realize that they are about to get locked away from the universe again. They rescue Rassilon from the station. He transmats out while they look for The Master. He has discovered another tissue compression eliminator. He separates the Guard unit sent after him and one by one uses it on them.
Before the time lock is secure, The Master forces The Rani to use her TARDIS to take him to Gallifrey to steal one of his own. They both escape with their own TARDIS but it is not clear that they got away.
After locking Gallifrey, The Doctors materialize back on the station, dangerously close to each other. 10 tells 11 to stop landing his TARDIS so close. They pick up Jamie and Zoe from the recovery ward. They have now fully recovered their memories.
They part ways. 10 takes Zoe home, then says he needs a vacation and promises Donna a world of crystal. 11 is visibly shaken by the thought of Jamie and Zoe getting their memories back but Donna losing hers permanently, as seen previously in Journey's End. He suppresses the emotion and takes Jamie home, then sets off for his original destination.
Alternate ending: 11 tells 10 that he looks like he could use a vacation and offers to take Zoe home. 10 promises Donna a vacation on the planet Midnight. 11, Clara, Jamie, and Zoe go off and have an adventure or two before taking them home.