The orbits of the planet and stars in the HD 131399 system