I have a scenario of a spacecraft departing from the far side of Mars (from Earth) at a particular date arriving at Earth at a particular date, without acceleration after launch I would like to know what sort of trajectory is required for that to work, given the relative motions of the planets and the gravity involved. I have a program called Celestia that will tell me where the planets are at the dates in question, but it won't let me do any dynamic calculations of orbits or free fall trajectories.
How would this be calculated? (this was written quickly on a phone, apologies for any readability issues)