The Martian Moons eXploration spacecraft, set to launch on 20 October, is designed to collect samples from Phobos. Back on Earth, those samples should solve a century-old mystery about how Mars gained its moons.