They recover the medicine to save Spock, capture the Orion Captain (who orders his crew to abort the self-destruct, which would now be a pointless loss of life, and surrender) and retrieve the dilithium crystals. Writer Howard Weinstein had been a fan of space exploration following the flight of NASA astronaut Alan Shepard on Mercury-Redstone 3. He recalled that his first experience of Star Trek was in middle school, where he mixed elements of the show up with Lost in Space.
Howard Weinstein
Alan Shepard