TITLE: Two retracts $A,B$ of $S^{2}$ with different relative location
QUESTION [5 upvotes]: Are there two retract  subsets  $A,B$  of $S^{2}$ with the following property:
$A,B$ are homeomorphic but two pairs $(S^{2},A)$ and  $(S^{2},B)$  are not  homeomorphic.
The same  question for  $S^{n}$

REPLY [4 votes]: I will identify $S^2$ with the Riemann sphere, the 1-point compactification of the complex plane. Start with the graph $G\subset {\mathbb C}$, which is the union of the four segments connecting $0$ with the points $\pm 1$ and $\pm i$. Now let $A$ be the union of $G$ with the two small disks centered at the points $\pm 1$. Let $B$  be the union of $G$ with the two small disks centered at the points $1, i$. Then, being contractible CW subcomplexes of $S^2$, both $A, B$ are retracts of $S^2$. On the other hand, there is no homeomorphism $(S^2,A)\to (S^2,B)$. Lastly, $A$ is clearly homeomorphic to $B$.