Let $A$ be a non-measurable subset of $[0,1]$ and let $f:[0,1] \to \bar {\Bbb R}$ be defined by $$f(x) = \begin{cases} x-2, & \text{if x $\in$ A} \\ x+2, & \text{otherwise.} \end{cases}$$
How should I examine the measurability of $f$?
I have definition of measurability of a function as follows:
Let $f:X \to \Bbb R$. we say $f$ is $\mathscr A$-measurable if:
$f^{-1}(+\infty) \in \mathscr A$, $f^{-1}(-\infty) \in \mathscr A$; and
$f^{-1}(U) \in \mathscr A$ for every open $U \subset \Bbb R$
I have no clue as to where should I begin. If I choose some open $U \subset \Bbb R$ then how will I get it's inverse image under $f$ inside the $\sigma$-algebra?Am I working on a Lebesgue measure?
Let us take a look at possible values of $f(x)$ when $x\notin A$: $$0\le x\le 1\Rightarrow 2\le f(x)\le 3.$$
If $x\in A $, then $-2\le f(x)\le -1$.
Therefore, we can consider an open set $U=(-4,0)$, which gives $f^{-1}(U)=A$, which is not measurable.