This is the Mean Value Theorem of Integrals for improper integrals.
$\int_a^b g(x) \mathrm{d}x$ is convergent (a or b is a flaw, maybe they are all flaws). If f is monotonically bounded on $(a,b)$, then there is a $\xi \in (a,b)$ such that
$$\int_a^b f(x)g(x) \mathrm{d}x = f(a^+)\int_a^\xi g(x) \mathrm{d}x + f(b^-)\int_\xi^b g(x)\mathrm{d}x$$
By Mean Value Theorem of Integrals for proper integrals, there is infinite $\xi$ such that $$\int_{a+\epsilon_1}^{b-\epsilon_2} f(x)g(x)\mathrm{d}x = f(a+\epsilon_1)\int_{a+\epsilon_1}^\xi g(x)\mathrm{d}x + f(b-\epsilon_2)\int_\xi^{b- \epsilon_2} g(x)\mathrm{d}x$$ for infinitely many $\epsilon_1 , \epsilon_2 >0$. So there is a limit point of $\xi$. But this limit point may be $a$ or $b$ so I don't know how to solve this quesiton.