Hint 1:solve around the barycenter, maybe you can use the reduced mass
Hint 2: Try doimg what I call 'overloading the system'. Start by assuming you know everything (eccentricity, both axes, position/velocity at any point). Now derive as many relations as possible.
The sum of two angles in different planes is known as a dogleg angle. A dogleg angle is not the same as an angle. The operation of adding two angles in different planes to get a dogleg angle is well-defined mathematically.
The reasons astronomers use the the longitude of the perihelion instead of the argument of the perihelion are circular orbits and equatorial orbits.
The inclination of an equatorial orbit is 0 by definition. Equatorial orbits do not have a line of nodes. Since the argument of the perihelion is the angle between the (non-existing) ascending node and the perihelion point, it is undefined.
Circular orbits do not have apses (points of perihelion and aphelion). Since the argument of perihelion is the angle between the ascending node and the (non-existing) point of perihelion, it is undefined. Without a perihelion, the longitude of perihelion, the true anomaly and the mean anomaly are all undefined.
To handle all possible orbits, astronomers use another dogleg angle, the mean longitude instead of the conceptually simpler mean anomaly. The mean longitude is the sum of the longitude of periapsis and the mean anomaly.
When applying Hamiltonian mechanics to the Kepler problem for the first time, a set of canonical angle-action variables was required. The first set, known as Delaunay elements, were defined in the 1860s. They are based on the argument of perihelion, the mean anomaly, and the longitude of the ascending node. Delaunay variables are singular for equatorial or circular orbits.
To remedy this, Poincaré elements were defined in the 1890s. They are based on the longitude of the perihelion, the mean longitude, and the longitude of the ascending node. They exist for all orbits (except when $ i\!=\!\pi $).
Best Answer
What you are asking for is not simple at all. Retrograde motion occurs when the line joining two planets rotates with respect to a fixed coordinate system (or the fixed stars) in the opposite direction as the planets. With both planets in motion in orbits that are not nicely aligned with each other, the times between retrograde motion will only be described by a complicated expression.
If you are numerically simulating the planets' orbits, here's what you can do: