The following lemma is called Borsuk lemma which can be found in Munkres' topology (Lemma 62.2).
(Borsuk lemma) Let $a$ and $b$ be points of $S^2$. Let $A$ be a compact space, and let $f:A\to S^2\setminus\{a,b\}$ be a continuous injective map. If $f$ is nulhomotopic, then $a$ and $b$ lie in the same component of $S^2\setminus f(A)$.
Now I need to show that if we does not assume $f$ to be injective, then the conclusion need not hold. I don't know how to find an example, the hypothesis that $f$ is nulhomotopic seems difficult to satifsy.