The Historical Voyager 2 Mission to Jupiter.
Trajectory is modelled as a 3 body problem, calculated from the dynamic vectors of position, velocity and gravity.
Coordinate data is from NASA ephemerides (with respect to solar system barycenter).
Jupiter start coordinates X: 0.8262 Y: 5.0206 AUs.
Earth start coordinates X: 0.8578 Y: -0.5443 AUs, Journey Time : 688.2 days.
This shows the orbit (in Green to Jupiter, then Blue on to Saturn), after escape from Earth.
Mars distance from ship is always increasing from at least 0.5AU so its gravity is ignored.