Let $f:\mathbb R\to\mathbb R$ be a non-negative Lebesgue measurable function such that $\int_I f(x)dx<\infty$ for all finite intervals $I=[a,b]$. For every Lebesgue-measurable set $A\subset\mathbb R$, define $$ \mu(A)=\int_Af(x)dx. $$ Prove that if $g:\mathbb R\to\mathbb R$ is a Lebesgue-measurable function, then $$ \int_{\mathbb R} g(x)d\mu(x)=\int_{\mathbb R} g(x)f(x)dx. $$
I know that this is a direct result of Radon–Nikodym theorem but can we show the identity above only with the help of basic Lebesgue-integral theory? WLG we can assume $g(x)\ge 0$ and consider the simple functions approximation. However, I find it hard if we only use the definition of the integral of non-negative functions. Can someone give me some hints? Thank you.