Let $f$ be Lebesgue measurable on $\mathbb{R^n},$ and let $E_{\alpha}=\{x\in \mathbb{R^n} \mid |f(x)|>\alpha \}$ for $\alpha >0.$
Let $g(x, \alpha):=\chi_{[1,2]}(\alpha) \chi_{E_{\alpha}}(x).$
Then, is $g$ measurable on $\mathbb{R^n}\times\mathbb{R}$ ?
I know $\chi_{[1,2]}(\alpha)$ is measurable on $\mathbb{R}$ since $[1,2]$ is measurable on $\mathbb{R}$.
And I expect that $\chi_{E_{\alpha}}(x)$ is measurable on $\mathbb{R^n}$ since $E_{\alpha}=\{x\in \mathbb{R^n} \mid f(x)>\alpha \} \cup \{ x\in \mathbb{R^n} \mid f(x)<-\alpha \}=\{f>\alpha \} \cup \{ f<-\alpha \}$ is probably measurable on $\mathbb{R^n}$ since $f$ is measurable on $\mathbb{R^n}$ .
But I don't know whether $g$ is measurable on $\mathbb{R^n} \times \mathbb{R}$.
Thanks for your help.
Hint: $\mathcal M(\mathbb R^n)$ is closed under union so, since $f$ is measurable, we have that $$E_{\alpha}=\{x\in\mathbb R^n: \vert f(x)\vert>\alpha\}=\underbrace{\{x\in\mathbb R^n:f(x)<-\alpha\}}_{=f^{-1}((-\infty,-\alpha))\in\mathcal M}\cup\underbrace{\{x\in\mathbb R^n:f(x)>\alpha\}}_{=f^{-1}((\alpha,+\infty))\in\mathcal M}\in\mathcal M(\mathbb R^n)\\ [1,2]\text{ is a compact set}\implies[1,2]\in\mathcal M(\mathbb R).$$ Now consider the function $\chi_{E_{\alpha}}(x)\chi_{[1,2]}(\alpha):\mathbb R^n\times \mathbb R\to \mathbb R$ as $$\chi_{E_{\alpha}\times[1,2]}(x,\alpha)=\begin{cases}1&&(x,\alpha)\in E_{\alpha}\times [1,2] \\0&&(x,\alpha)\notin E_{\alpha}\times[1,2]\end{cases}$$ infact $\chi_{E_{\alpha}}(x)\chi_{[1,2]}(\alpha)=1\iff x\in E_{\alpha}$ and $\alpha\in [1,2]$.
You could now consider the sigma-algebra generated by $\mathbb R^n\times \mathbb R$, denoted by $\mathcal M(\mathbb R^n)\otimes\mathcal M(\mathbb R)$.