An object eight times the mass of Jupiter may have swooped around the sun, coming superclose to Mars' present-day orbit before shoving four of the solar system's planets onto a different course.
It actually follows its own tiny elliptical orbit around what is called the center of gravity (the barycenter) of the system, the sun and the orbiting planets. This barycenter is usually not equal ...