What is the relation between the union of the derived sets to the derived set of the union in a metric space? Let $(X,d)$ be a metric space, and let $A$ and $B$ be two (non-empty) subsets of $X$. Let $A^\prime$, $B^\prime$, and $(A \cup B)^\prime$ denote the derived set (i.e. the set of all the limit points) of $A$, $B$, and $A\cup B$, respectively. Then we can show that 
$$ A^\prime \cup B^\prime \subseteq (A \cup B)^\prime.$$ 
Can this inclusion be proper? If so, what example can we give? If not, how to prove the equality? 
I know that in a topological space, the above inclusion can be proper. For example, Let $(X,\mathbb{\tau})$ be a topological space, where $$X \colon= \{a, b, c \}$$ and $$\mathbb{\tau} \colon= \left\{\emptyset, X, \{a,b\}, \{c\} \right\}. $$ Then if we let $$ A \colon= \{a,b\}$$ and $$B \colon= \{c\},$$ then we have $$A^\prime = \{a,b\}, $$ whereas $$B^\prime = \emptyset;$$ so $$A^\prime \cup B^\prime = \{a,b\}.$$ However, $$A \cup B = \{a,b,c\} $$ so that $$(A\cup B)^\prime = \{a,b,c\}.$$ Hence in this case $$A^\prime \cup B^\prime \subset (A \cup B)^\prime, $$ but $$A^\prime \cup B^\prime \neq (A \cup B)^\prime, $$

Let $x ∈ (A ∪ B)'$. Either $x ∈ A'$ or there exists $U_A$ neighborhood of $x$ such that $U ∩ A ⊆ \{x\}$. And the same for $B$. So either $x ∈ A' ∪ B'$ or $(U_A ∩ U_B) ∩ (A ∪ B) ⊆ \{x\}$, which is contradiction. So $(A ∪ B)' = A' ∪ B'$ holds for arbitrary topological space.
