I am able to prove the case when $f$ is Lipschitz and $g$ is absolutely continuous. But I am having trouble solving the problem as stated. The main problem I am facing is that if $\{(a_i, b_i)\}_i$ is a finite set of disjoint open intervals, $\{(g(a_i), g(b_i)\}_i$ may not be a disjoint, which prevents me in using the absolute continuity of $f$.
Can anyone give me a hint in resolving this? Thank you in advance.