Let $X=[0,1] \cup [2,3]$ and let $Y=[0,2]$. I have $p: X \to Y$ defined by
$$p(x)= \begin{cases} x \quad &\text{for} \ x \in [0,1] \\ x-1 \quad &\text{for} \ x \in [2,3] \end{cases}$$
I have to prove that $p$ is a closed map. I tried a lot of times, but I didn't get it. And I have to prove it without compactness
Hint: you have to show that if $A \subseteq [0, 1] \cup [2, 3]$ is closed, then $p(A)$ is closed. Now $p(A) = p(A \cap [0, 1]) \cup p(A \cap [2, 3])$, which will be closed if $p(A \cap [0, 1])$ and $p(A \cap [2, 3])$ are both closed (that's sufficient, but not necessary, but it will do for this problem). $A$ is closed iff $A \cap [0, 1]$ and $A \cap [2, 3]$ are both closed (do you see why?). Now $p$ restricts to the identity on $[0, 1]$ and to the function $x \mapsto x - 1$ on $[2, 3]$. I'll let you take it from there, by showing that both of these restrictions of $p$ are closed functions.