I was reading the notion of quotient map, topology and space but ran into the following example.
In this example I have understood almost everything except one moment: How to prove rigorously that $p(x)$ is closed map.
Would be thankful if anyone will show the rigorous proof.
If you want to do it from scratch, note that $f:x\mapsto x$ and $g:x\mapsto x-1$ are closed maps on $\mathbb R$ (this is easy to prove).
Let $C$ be closed in $X$, so there is a closed set $C'\subseteq \mathbb R$ such that
$X\cap C'=[0,1]\cap C'\sqcup [2,3]\cap C'=C.$ Then,
$p(C)=f([0,1]\cap C'))\sqcup g([2,3]\cap C'))=$
$[0,1]\cap C'\sqcup [1,2]\cap g(C')=[0,2]\cap (C'\cup g(C'))$.
Since $C'$ is closed in $\mathbb R$ by assumption and $g(C')$ is closed in $\mathbb R$ also, by the first remark, we conclude that $p(C)=[0,2]\cap (C'\cup g(C'))$ is closed in $Y$.