This question has generated quite a few comments. In view of this interest you might want to know a more definitive answer. Preiss and Uher published this in their days as students in Prague.
Preiss, David; Uher, Jaromír
A remark on the substitution for the Riemann integral. (Czech. English summary)
Časopis Pěst. Mat. 95 1970 345–347.
Theorem: Let $g $ be a Riemann integrable function on $[a,b]$; for $s∈[a,b]$ put $G(t)=∫_s^t g(w)dw$ $(t∈[a,b])$; let $f$ be a function
bounded on $[c,d]=G([a,b])$; then if either one of the Riemann
integrals $∫_a^b f(G(t))g(t)dt$, $∫_{G(a)}^{G(b)}f(x)dx$ exists, the
other exists also and these integrals are equal.
The proof is based on an earlier result of R. O. Davies [Math. Gaz. 45 (1961), 23–25].
An online proof for this (in English, not Czech) can be found here:
http://www.teaching.math.rs/vol/tm1813.pdf