Let $E$ be nonmeasurable and define $$f=\begin{cases}0,\,x\in E\\\frac1{x}\quad\text{otherwise}\end{cases}$$ and $$g=\begin{cases}0\quad\text{otherwise}\\\dfrac1{x},\,\,x\in E\end{cases}$$
Then, is $f$ measurable and $g$ non measurable? I think both are nonmeasurable, because, the inverse image of a measurable set, $\{0\}$ is nonmeasurable in both cases. Any hints. Thanks beforehand.