How can we see planets thousands of light years away but don't know if there are more planets in the solar system?
The problem with finding a new planet in our solar system is not that it is too faint, but knowing where to look in a big, big sky. This putative planet 9 is likely to be in the range 20-28th magnitude (unless it is a primordial, planet-mass black hole, in which case it will be invisible except for any accretion luminosity). This is faint (especially at the faint end), but certainly not out of reach of today's big telescopes. I understand that various parts of the sky are currently being scoured, looking for a faint object with a (very) large parallax.
The problem is that whilst it is comparatively easy to search large areas of the sky quite quickly if you are interested in bright objects; to do deep searches you are normally limited (by time) to small areas. And you have to repeat your observations to find an object moving with respect to the background stars.
If planet 9 had been a gas giant, it would have been self-luminous, due to gravitational contraction, and would have been picked up by infrared surveys like 2MASS and WISE. But the suggestion is that it is rocky or icy, is only observable in reflected light from the Sun and is hence a very faint object at visible wavelengths.
With exoplanets around other stars that can be hundreds or thousands of light years away, you know where to look - basically close to the star. The solid angle that you have to search is comparatively small. That being said, there are other problems to overcome, mostly the extreme contrast in brightness between planet and star, which means that the only directly imaged exoplanets (or low-mass companions) to other stars are much more massive (by at least an order of magnitude) than the possible new planet 9. Indeed if these objects existed in our solar system we would have easily found them already in infrared all-sky surveys such as 2MASS and WISE.
The smaller planets that have been found around other stars are not found by directly imaging them. They are found indirectly by transiting their parent star or through the doppler shift caused by their gravitational pull on their parent star. For an object in our solar system that is far away from the Sun then the first of these techniques simply isn't possible - planet 9 will never transit in front of the Sun from our point of view. The second technique is also infeasible because (a) the amplitude of the motion induced in the Sun would be too small to detect and (b) the periodic signal one would be looking for would have a period of about 20,000 years! All of the indirectly detected exoplanets have periods of about 15 years or less (basically similar to the length of time we have been monitoring them).
It is also worth emphasising, that if we observed our solar system, even from a nearby star, it is unlikely we would pick up planet 9, but we would find Jupiter, Saturn and possibly one of the inner planets if it happened to transit. In other words, our census of exoplanets around other stars is by no means complete. See If Alpha Centauri A's solar system exactly mirrored our own, what would we be able to detect? for more details.
The reason why we can see exoplanets thousands of light years away but not a planet 200 AU away (about 30 light-hours) is because these planets are found using different techniques. The planet discussed in the article I linked was discovered using a technique known as "microlensing," which requires a star to pass behind another star with a planet around it. The rear star's brightness is enhanced by passing behind the foreground star, because the gravity of the foreground star focuses light from the background star much light a more traditional glass lens focuses light. The gravity of the planet provides a smaller but still detectable brightening over what the foreground star would produce by itself.
Other detection techniques for planets outside our solar systems include:
- measuring the wobble of a star due to a planet's gravity pulling on it.
- measuring the temporary dimming of a star as a planet passes in front of it
- directly imaging the planet with a high-resolution telescope like the Hubble Space Telescope.
Of all these techniques, direct imaging is the only one that has worked so far for solar system objects. The putative 9th planet is too far away from the sun for its gravity to produce a measurable wobble, and it will never cross in front of the sun from our point of view for us to measure its dimming effect on the sun. I think the microlensing technique may work for something like the 9th planet (I don't know for sure), but the only way you'll be able to detect a solar system object via microlensing is if you have a telescope pointed directly at it to take the microlensing data. However, an effective microlensing survey requires taking multiple observations in very quick succession, so instead of being able to observe a large part of the sky you have to observe a small part of the sky a lot of times, so your search area is also small.
If all you're doing is trying to image the planet, then in principle you can discover a new planet with just two images. If a bright spot moves between those two images, then you've found a solar system object of some kind, and follow up observations can confirm whether it is a new planet or a nearby small asteroid. But since you only need to take two images of each part of the sky, the search area accessible with a given amount of telescope type is much larger so you'll be much more likely to discover a new planet with this technique over microlensing.
We haven't detected planets millions of light years away. Right now the most distant is less than 20,000 light years away.
Even for the planets we have detected, they are for the most part not "seen" or imaged directly. Instead they are found by the effect they have on the parent star (usually gravitational wobble or transit detection). In both cases, being able to see repeated orbits is necessary. This limits it to those planets that are somewhat close to the star. So we are detecting only a subset of exoplanets that are easiest to find.
Planets far from any star have little gravitational effect and only tiny amounts of reflected light. Such objects are difficult to find in our system and are currently well beyond detection in other systems.