Somehow, Nelson can use Pem's device extremely well. At the end of the episode, Nelson presses a button and travels through time, arriving at the Institute. Realizing he needs to be elsewhere, Nelson presses another button and arrives on Seaview, presumably at the same time (the thing must be great in traffic jams). By the time Nelson ejects the bomb, there are now two Admiral Nelsons. Did the Nelson at the institute vanish? If so, then Pem never met up with him and started the whole thing. If the Seaview Nelson vanished, then the sub returned home, gathered Nelson and went back out (or he took the flying sub).