[step:Establish the formula for $g = \mathbf{1}_B$ with $B \subseteq \mathbb{R}^n$ Borel]
Let $B \subseteq \mathbb{R}^n$ be a Borel set. We compute both sides of the change of variables formula for $g := \mathbf{1}_B$.
Set $E := A \cap f^{-1}(B) = \{x \in A : f(x) \in B\}$. This set is $\mathcal{L}^m$-measurable: $f$ is continuous (hence Borel measurable) since it is Lipschitz, so $f^{-1}(B)$ is Borel measurable, and the intersection with the measurable set $A$ is measurable.
**Left-hand side**: substituting $g(f(x)) = \mathbf{1}_B(f(x)) = \mathbf{1}_{f^{-1}(B)}(x) = \mathbf{1}_E(x) \cdot \mathbf{1}_A(x)$ for $x \in A$ (and the integration is over $A$),
\begin{align*}
\int_A g(f(x)) J_m f(x) \, d\mathcal{L}^m(x) = \int_A \mathbf{1}_E(x) J_m f(x) \, d\mathcal{L}^m(x) = \int_E J_m f(x) \, d\mathcal{L}^m(x),
\end{align*}
where the last step uses $E \subseteq A$ to replace integration over $A$ against $\mathbf{1}_E$ with integration over $E$.
We apply the [Area Formula](/theorems/3075) to the $\mathcal{L}^m$-measurable set $E$. The hypotheses of the area formula are satisfied: $f: \mathbb{R}^m \to \mathbb{R}^n$ is Lipschitz with $m \le n$ (the hypotheses of the present theorem), and $E \subseteq \mathbb{R}^m$ is $\mathcal{L}^m$-measurable. The area formula gives
\begin{align*}
\int_E J_m f(x) \, d\mathcal{L}^m(x) = \int_{\mathbb{R}^n} N(f, E, y) \, d\mathcal{H}^m(y),
\end{align*}
where $N(f, E, y) := \#\{x \in E : f(x) = y\} = \#(f^{-1}(y) \cap E)$.
**Identification of $N(f, E, y)$**: since $f$ is injective on $A$ by hypothesis and $E \subseteq A$, $f$ is injective on $E$, so $\#(f^{-1}(y) \cap E) \in \{0, 1\}$ for every $y$. Specifically,
\begin{align*}
N(f, E, y) = \begin{cases} 1 & \text{if } y \in f(E), \\ 0 & \text{otherwise}. \end{cases}
\end{align*}
Hence $N(f, E, y) = \mathbf{1}_{f(E)}(y)$.
We now identify $f(E)$. By definition of $E$, $f(E) = \{f(x) : x \in A, f(x) \in B\} = f(A) \cap B$ (using injectivity of $f$ on $A$ in the forward direction: every element of $f(A) \cap B$ has a unique preimage in $A$ which lies in $E$). Hence $\mathbf{1}_{f(E)}(y) = \mathbf{1}_{f(A) \cap B}(y) = \mathbf{1}_{f(A)}(y) \mathbf{1}_B(y)$.
**Right-hand side**: combining,
\begin{align*}
\int_A g(f(x)) J_m f(x) \, d\mathcal{L}^m(x) = \int_{\mathbb{R}^n} \mathbf{1}_{f(A)}(y) \mathbf{1}_B(y) \, d\mathcal{H}^m(y) = \int_{f(A)} \mathbf{1}_B(y) \, d\mathcal{H}^m(y) = \int_{f(A)} g(y) \, d\mathcal{H}^m(y).
\end{align*}
This is the change of variables formula for $g = \mathbf{1}_B$.
[/step]