I was encountering such an equation in Lebesgue integration
$$ \int_{B(x_{0}, r)} \left ( \frac{\|x_{0} - x\|_2}{r} \right)^{2} \lambda(dx) = n \cdot \lambda(B(0,1)) \int_{0}^{r} (\frac{\rho}{r})^{2} \rho^{n-1} d\rho $$
where $x$ is a n-dimensional vector, $\lambda$ is Lebesgue measure on $\mathbb{R}^{n}$ and $B(c,r) = \{x \in \mathbb{R}^{n} : ||x - c||_2 \leq r \}$.
So it is obvious we use change of variable by replacing $||x_0 - x||_{2}$ to $\rho$. However, I cannot strictly construct the path from $\lambda(dx)$ to $\lambda (d B(0, \rho))$.
Any thoughts on this would be helpful.
Any Lebesgue integral in $\mathbb{R}^n$ can be rewritten in polar form. More precisely we can identify $(0 , \infty) \times S^{n-1} $ with $\mathbb{R}^n - \{0\}$ under the homeomorphism $\phi : (r, x) \mapsto rx$. Then the Lebesgue measure restricted to the latter space is the product of a radial measure on $(0, \infty)$ given by $E \mapsto \int_E r^{n-1} dr$ and a surface measure $\sigma$ on $S^{n-1}$. The surface measure has a very natural definition. If $E$ is a measureable subset of $S^{n-1}$ then we can consider the sector $E_1$ obtained by taking the set of all lines from the origin to $E$, and $\sigma(E)$ is defined as $n\lambda(E_1)$ where $\lambda$ is the Lebesgue measure.
For your integral we have $$\begin{align*} \int_{B(x_0, r)} \left(\frac{\|x - x_0\|}{r}\right)^2 dx &= \int_{B(0, r)} \left(\frac{\|x\|}{r}\right)^2 dx \quad \text{using a change of variable}\\ &= \int_{S^{n-1}} \int_0^r \left(\frac{\rho}{r}\right)^2 \rho^{n-1}d\rho d\sigma \quad \text{writing as a polar integral}\\ &= \left(\int_0^r \left(\frac{\rho}{r}\right)^2 \rho^{n-1}d\rho \right) \left(\int_{S^{n-1}} d\sigma \right) \\ &= \left(\int_0^r \left(\frac{\rho}{r}\right)^2 \rho^{n-1}d\rho \right) n \lambda(B(0, 1)) \end{align*}$$