Consider $X = \{(x,0) \mid x \in \mathbb{R} \} \cup \{(x,1/x) \mid x > 0 \}$, where we will let $A$ denote the first set in the union, and $B$ the second set. I am trying to show this set is no connected.
Clearly they $A$ and $B$ disjoint, and so all that remains is to check whether the sets contain each others limit points. To begin, suppose that $(x,y)$ is a limit point of $A$ and contained in $B$. Then $x > 0$ and $y = \frac{1}{x}$, and clearly the open set $B((x,1/x),\varepsilon) \cap X$, where $\varepsilon = 1/x$, contains no points of $A$, since
$$\sqrt{(x-w)^2 + \left(\frac 1 x - 0\right)^2} < \frac 1 x$$
$$(x-w)^2 < 0$$
is a contradiction
I am having trouble dealing with the other case, when we take $(x,y)$ to be a limit point of $B$ and contained in $A$. When I draw a picture, the only choice for $\varepsilon$ that comes to mind is $1/x$, but this didn't seem to lead anywhere. I could use some hints.