There is no simple formula.
First, it's not true that the angular speed of a planet relative to the sun can be found from its orbital period. This is because planets don't move in circles, but in eclipses and the speed of the planet changes, as described by Kepler's second Law.
When describing the motion of a planet in the sky you need to consider the elliptical motion of both the Earth and the planet, the superposition of these motions causes the planets to make looping motions in the sky, sometimes slowing down and moving backwards
The image shows how Mars would have appeared to loop and move backwards in 2003 and 2005.
The motion in the sky can be calculated, but not by a simple formula. You start with the orbital elements of the planets, solve Kepler's equation to determine the position on their elliptical orbit. Solve some trigonometry to determine the position of each planet relative to the sun, then some vector calculations and spherical geometry to find the position of the planet relative to Earth.
There is a guide online for writing a computer program to do this.