Astronomers have spotted two planets forming around a distant infant star, offering a time capsule into see what the solar system looked like billions of years ago.