I have a problem in my metric space text that if $X$ is a metric space and $A$ be a connected subspace of $X$ such that $A$ intersects a set $B$ and also intersects $(X-B)$.Show that $A\cap \partial A\neq \phi$.
Now,what does the problem means to say?I think it is false.Take $X=\mathbb R$ carrying usual metric and $A=(0,1)$ then $A\cap \partial A=\phi$ although $A$ is connected and $A$ intersects $B=\{1/2\}$ and $X-B=\mathbb R-\{1/2\}$ both.So,what does the question means when they say $A$ intersects a set $B$ and also intersects $X-B$.Does it means if $A$ intersects $B$ then it also intersects $X-B$.But then also there is a problem as $A$ intersects $A$ but not $X-A$.So,the meaning is not clear to me.Can someone please help me understand the meaning of the problem.
Your example with $A=(0,1)$ and $B=\{\frac12\}$ is not a counterexample: indeed $A \cap \partial B$ is non-empty, as $\partial B=B$ here.
Hint (for corrected exercise): If $A \cap \partial B = \emptyset$ then $$A \subseteq X\setminus \partial B = \operatorname{int}(B) \cup \operatorname{int}(X-B)$$