There are two main ways we detect exoplanets. The primary way that I believe accounts for the vast majority of planets we have detected is the transit method. Basically we watch the light from a star very closely and look for a dip in the amount of light coming from it as a planet transits in between us and the star. This of course depends on the planet to pass directly between us and the star, and that means that its ecliptic plane has to be directly edge on with us. The second method is that we are able to detect minor wobbles in a star that infers that there is a planet sized object that is perturbing the star. I believe this is only able to detect Jupiter sized objects up to brown dwarves or other stars though, and even that depends on the distance to the star, and I believe only when the planet orbits at a relatively close distance (I believe closer than the kuiper belt)
The problem in both cases as it relates to planet 9 is that you arent detecting the planet as much as its effects. If you take any planet that far away from a star and youre trying to detect either the very little bit of light that it might be reflecting or its infrared heat signature if youre lucky, but both are incredibly dim.