Just another solution. I had no intention to publish this, I made it just for my own amusement. I didn't see any solution not using conversion to cartesian coordinates so I decided to share my solution as it seems to be using a little different angle.
Idea is that when observed from the center of the earth two satellites have a line of sight if the angle between the satellites is smaller than the sum of the angles of the radio horizonts of the satellites.