Solution (source code)

= Solution

Insert the uniformly convergent <Fourier series> of $g$ into the interval formula and integrate termwise. The constant mode contributes $tg_0$, while for $k\ne0$,
$$
\frac12\int_{x-t}^{x+t}e^{iks}ds=e^{ikx}\frac{\sin(kt)}k.
$$
The sum is exactly the expression from part (b), proving agreement of the transform and Fourier-series formulas.