That seems an unnecessary approach here. First prove the theorem for non-negative functions, then extend to all functions as you've indicated.
For nonnegative $f$, note that if $h$ is bounded and has finite support on $A$, then you can define $$h_E(x) =\begin{cases} h(x) & x\in A\\0 & x \in E \setminus A\end{cases}$$
Then $h_E$ is bounded and has finite support on $E$. Further, $h_E\chi_A = h_E$ and $h_E|_A = h$. Conversely if $h$ is bounded and has finite support on $E$, then $h\chi_A|_A$ is bounded and has finite support on $A$.
Edit: as requested, where I've tried to dot all the i's and cross all the t's.
For notational convenience, for measurable sets $B$ and measurable non-negative functions $g$, define ${\scr M}(g, B)$ to be the set of all bounded measurable functions $h$ of finite support on $B$ such that $0 \le h \le g$.
Let $f$ be a non-negative measurable function on $E$ and $A$ a measurable subset of $E$. Then $\chi_Af$ is also a measurable function on $E$.
Now if $h \in {\scr M}(\chi_Af,E)$ and $x \in E \setminus A$, then $0 \le h(x) \le \chi_A(x)f(x) = 0\cdot f(x) = 0$. Hence $\operatorname{supt} h \subseteq A$. And for $x \in A$, $0 \le h(x) \le \chi_A(x)f(x) = 1\cdot f(x) = f(x)$, so $0 \le h \le f$ on $A$. Therefore $h|_A \in {\scr M}(f,A)$. And, $$\int_E h = \int_A h + \int_{E\setminus A} h = \int_A h$$ since $h = 0$ on $E\setminus A$.
Conversely, if $h' \in {\scr M}(f,A)$, then define $h : E \to \bar{\Bbb R}$ by $$h(x) = \begin{cases} h'(x) & x \in A\\0 & x \notin A\end{cases}$$
Then $h$ is measurable, $\operatorname{supt} h = \operatorname{supt} h'$ and therefore is finite, and if $h' < M$, then $M > 0$, so $h < M$ as well. And lastly $$h(x) = \begin{cases} h'(x) \le f(x) = \chi_A(x)f(x) & x \in A\\0 = \chi_A(x)f(x) & x \notin A\end{cases}$$
Hence $h \in {\scr M}(\chi_Af,E), h' = h|_A$ and therefore $$\int_E h = \int_A h'.$$ Therefore the restriction map $T\ :\ {\scr M}(\chi_Af,E) \to {\scr M}(f,A)\ :\ h \to h_A$ is a bijection, and $\int_E h = \int_A T(h)$. So $$\begin{align}\int \chi_Af &= \sup\left\{\int_E h \ :\ h \in {\scr M}(\chi_Af,E)\right\}\\
&=\sup\left\{\int_A T(h) \ :\ h \in {\scr M}(\chi_Af,E)\right\}\\
&=\sup\left\{\int_A T(h) \ :\ T(h) \in {\scr M}(f,A)\right\}\\
&=\sup\left\{\int_A h' \ :\ h' \in {\scr M}(f,A)\right\}\\
&=\int_A f\end{align}$$
When $f$ may be negative, $$\int_E\chi_Af = \int_E\chi_Af^+ -\int_E\chi_Af^- = \int_A f^+ - \int_Af^- = \int_Af$$
The choice of writing $dx$ in the first two integrals is unfortunate. It is a nearly universal convention that when you write $dx$ as the differential of an integral, you mean Riemann integration, and when you write $dm$ or $d\mu$ as the differential, you mean Lebesgue integration. So the answer to your first question is that we're not taking the integral with respect to $x;$ in context, your book is definitely talking about Lebesgue integration.
You are integrating with respect to the measure $m$ in the second statement. It's another unfortunate choice of notation: most authors would have written
$$\int_{\mathbb{R}^d}\varphi(x)\,dm\quad\text{or}\quad \int_{\mathbb{R}^d}\varphi(x)\,d\mu$$
for the second integral, depending on whether they were talking about the Lebesgue measure, or a more general measure.
There is a theorem that says if a function $f$ is Riemann integrable, then the Riemann integral over a region is equal to the Lebesgue integral over the same region. And that only makes sense. Counting up your area in two different ways shouldn't give you two different results!
Best Answer
To show that the Lebesgue integral of $x^{-1}$ is infinite, use a change of variables $x \mapsto 1/x$ and consider the sequence of simple functions
$$\phi_n = \sum_{j=1}^nj \chi_{((j+1)^{-1},j^{-1})}.$$
Note that $0 \leqslant \phi_n(x) \leqslant x^{-1}$ and
$$\int_{(0,1]}\phi_n = \sum_{j=1}^n j\left(\frac1{j}- \frac1{j+1}\right)=\sum_{j=1}^n \frac1{j+1}\to_{n \to \infty} +\infty.$$
Whence,
$$\int_{[1,\infty)}x^{-1} = \int_{(0,1]}x^{-1} = +\infty$$