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$?

You have:
$$p^{-1}(L) = p^{-1}(\{a\} \cup L \setminus \{a\})= p^{-1}(\{a\}) \cup p^{-1}(L \setminus \{a\}) = \{0\}\cup p^{-1}(L \setminus \{0\}),$$
which enables to conclude as $\{b\}$ is the complement of the open set $(-\infty,b) \cup (b, \infty)$ for any $b \in \mathbb R.$
