Prove that $ (A \cup B)'\subset A' \cup B'$ Prove that $ (A \cup B)'\subset A' \cup B'$
My attempt:
Suppose $p\in (A\cup B)'$, If $p\notin A'$.claim that  $p\in B'$. since $p\notin A'$ so there exist  $\epsilon_0>0$ such that $N_{\epsilon_0}(p)\cap A \subset \{p\}$.
Now for any $\epsilon >0$ ,let $r= \min \{\epsilon,\epsilon_0\}$. Since $p \in (A \cup B)'$, $N_r(p)\cap A\subset \{p\}$. From the assumption that $p\in(A\cup B)'$, we deduce that $N_r(p)\cap(A\cup B)\ne\emptyset$, so $N_r(p)\cap B\ne\emptyset$.
It follow that $p$ is a limit point of $B$, so $p \in B'= (A\cup B)'$. This implies that $(A \cup B)'= B'$.
Finally $(A \cup B)'\subset  A' \cup B'$ which completes the proof.
Note : $N_r(p)$ denote the neighborhood of $p$ consisting of all $q$ such that $d(p,q)  <r$ and  $A'$ denote  the set of all derived points of $A$
Is this proof correct or not?
 A: To clarify the picture, let us recall the definition of "derived
point" or "accumulation point". Let $(X,\tau)$ be a topological
space. Let $A\subseteq X$. We say that $p\in X$ is an accumulation
of $A$ if for each neighborhood $U$ of $p$, $(U\setminus\{p\})\cap A\neq\emptyset.$
The set of all accumulation points of $A$ is denoted by $A'$.
Let $A,B\subseteq X$, we go to prove that $(A\cup B)'\subseteq A'\cup B'.$
Prove by contradiction. Suppose the contrary that there exists $p\in(A\cup B)'\setminus(A'\cup B').$
Hence, $p\notin A'$ and $p\notin B'$. Choose an open neighborhood
$U$ of $p$ such that $U_{p}\cap A=\emptyset$, where $U_{p}:=U\setminus\{p\}$.
Choose open neighborhood $V$ of $p$ such that $V_{p}\cap B=\emptyset$.
Let $W=U\cap V$, which is an open neighborhood of $p$. Observe that
$W_{p}\cap A\subseteq U_{p}\cap A=\emptyset$ and $W_{p}\cap B\subseteq V_{p}\cap B=\emptyset$.
Therefore, $W_{p}\cap(A\cup B)=(W_{p}\cap A)\cup(W_{p}\cap B)=\emptyset$,
which contradicts to the fact that $p\in(A\cup B)'.$
