Calculating right ascension for two planets and their separation using python
The issue appears to be in your understanding of the separation function. You state that


  it calculates the separation (angle) between those 2 planets with respect to their "x" projection in a plane.


however, the documentation states


  The separation() function computes the angle in degrees between two bodies, as measured by their right ascension and declination. In general separation() can measure the angle between any pair of spherical coordinates, so long as the elements of each coordinate are spherical longitude (angle around the sphere) followed by spherical latitude (angle above or below its equator). Each pair should be provided as a two-item sequence like a tuple or list. Appropriate coordinate pairs include right ascension and declination; heliocentric longitude and latitude; azimuth and altitude; and even the geographic longitude and latitude of two locations on earth.


This means that this function is calculating the angular separation between the two objects, not just the separation in a particular plane. If you want to perform the same calculation (as the documentation says they're performing), it looks like you actually want the general angular distance formula.

$$\theta = \cos^{-1}\left[\sin(\delta_1)sin(\delta_2)+\cos(\delta_1)\cos(\delta_2)\cos(\alpha_1-\alpha_2)\right]$$

where $\delta\in[-\pi/2,\pi/2]$ is the declination, and $\alpha\in[0,2\pi]$ is the Right Ascension.