Closedness of a mapping $p : [0,1] \cup [2,3] \to [0,2]$ Below is an example (Example 1, p.137) from Munkres' book Topology.

Let $X$ be the subspace $[0,1] \cup [2,3]$ of $\mathbb{R}$, and let $Y$ be the subspace $[0,2]$ of $\mathbb{R}$. The map $p:X \to Y $ defined by
  $$p(x) =
 \begin{cases}
 x, & \text{for }x\in [0,1] \\
 x-1, & \text{for }x\in [2,3] \end{cases}$$
  is readily seen to be surjective, continuous and closed.

It is clear to me that $p$ is surjective and continuous, but I cannot not see "readily" why $p$ is closed.
To show $p$ is closed, I let $U$ be a closed subset of $X$ and tried to show $p(U)$ is closed in $Y$, but I am not sure how to proceed. 
How can I see/prove that $p$ is closed?
 A: If $A \subseteq [0,1] \cup [2,3]$ is closed, let $y \in \overline{f(A)}$. As $[0,2]$ is metric there is a sequence $( y_n )_n$ in $f(A)$ converging to $y$. For each $n$ there is an $x_n \in A$ such that $f(x_n) = y_n$. Now there is a subsequence $(x_{n_i})_i$ of $( x_n )_n$ which is either entirely contained in $[0,1]$ or entirely contained in $[2,3]$, and we can show that $| x_{n_i} - x_{n_j} | = | y_{n_i} - y_{n_j} |$ for all $i,j$. The subsequence $( x_{n_i} )_i$ must be then Cauchy, and so it converges to some $x$. By closedness of $A$, $x \in A$. If $f(x) \neq y$ then letting $\delta = \frac{|f(x)-y|}{2}$ there is an $M$ such that $| f(x) - y_{n_i} | > \delta$ for all $i \geq M$, but then $| x - x_{n_i} | > \delta$ for all $i \geq M$, contradicting that $( x_{n_i} )_i$ converges to $x$. So $f(x) = y$, and so $y \in f(A)$. Thus $f(A)$ is closed.
Alternatively you could use the following characterization of closed mappings (see this previous question):

Fact. A mapping $f:X \to Y$ between topological spaces is closed iff for each $y \in Y$ and each open $U \subseteq X$ with $f^{-1} (y) \subseteq U$ there is an open neighborhood $V$ of $y$ such that $f^{-1} ( V ) \subseteq U$.

Now, given $y \in [0,2]$ and an open $U \subseteq [0,1] \cup [2,3]$ with $f^{-1} ( y ) \subseteq U$, for each $x \in f^{-1} (y)$ there is a $\delta_x > 0$ such that $( x - \delta_x , x + \delta_x ) \cap X \subseteq U$. As $f^{-1} (y)$ is finite let $\delta = \min \{ \delta_x : x \in f^{-1} (y) \}$, and take $V = (y- \delta, y+\delta) \cap Y$.
