Janet and James Kirk were romantically involved in 2261, but the two called it off in favor of their respective careers. Janet was eventually stationed on a lonely outpost, where she met her co-worker and future husband, Theodore. After Theodore died, she received a stargram from Kirk, but otherwise lost touch with him until 2267.
Doctor Wallace was on board the USS Enterprise during its mission to Gamma Hydra IV. She worked with Doctor McCoy to find a cure for the radiation disease causing rapid aging in members of the senior staff. While the senior staff was afflicted with the disease, the Enterprise was surrounded by Romulans. Commodore Stocker, a Starfleet observer, took command of the ship and, due to his inexperience, was unable to elude the Romulans, who surrounded the Enterprise.
Doctor Wallace, who was not affected by the disease, was McCoy's right hand in attempting to find a cure, which turned out to be adrenaline. They were able to inject the crew, and Kirk was able to escape the Romulans. (TOS: "The Deadly Years")