Showing measurability of composite function Let $p:\mathbb{R}\rightarrow\mathbb{R}$ be a continuous map and $p':\mathbb{R}\rightarrow\mathbb{R}$ with $p'(x) = \left\{
     \begin{array}{lr}
       a & : x=0\\
       p(x) & : x\neq 0.
     \end{array}
   \right.$
I want to show that $p'$ is Lebesgue measurable, i.e. for all $L\in\mathcal{L}$, with $\mathcal{L}$ the Lebesgue sigma-algebra, we have $p'^{-1}(L)\in\mathcal{L}$.
If $a\notin L$, then $p'(L)\in\mathcal{L}$ since $p$ is measurable.
But what if $a\in L$?

$\{a\} \in \mathcal{L}$ -it is a complement of open set. 
Let $A, B \in \mathcal{L}$, then $A \setminus B \in \mathcal{L}$, and indeed $A \setminus B = A \cap B^C = (A^C \cup B)^C$, i.e. in $\sigma$-algebra ($\mathcal{L}$).
So, in case $a \in L$ take $L = (L\setminus\{a\}) \cup \{a\}$, and pull it back, you have $$p'^{-1}(L) = p^{-1}(L\setminus\{a\}) \cup \left(p^{-1}(\{a\}) \cup\{0\}\right)$$, the first one is measurable set, as pre-image of measurable set under measurable function, and $p^{-1}(\{a\})$ is also measurable for the same reason, $\{0\}$ is closed and hence measurable
