This is Exercise 7.3.4(a) from Understanding Analysis by Stephen Abbott (2nd edition):
Let $f$ and $g$ be functions defined on (possibly different) closed intervals, and assume that the range of $f$ is contained in the domain of $g$ so that the composition $g\circ f$ is properly defined. Show, by example, that it is not the case that if $f$ and $g$ are (Riemann) integrable, then $g\circ f$ is (Riemann) integrable.
I'm completely lost about how to think up a counter example to this problem. How would you approach the thinking process? I assume if has to do with finding $f$ and $g$ such that $g\circ f$ resembles the Dirichlet function or another non-Riemann-integrable function.