I will note you did the first step wrong. Note that you should have
$$g(x)=\int_a^xf(t)\ dt$$
Differentiating:
$$g'(x)=\lim_{h\to0}\frac{\int_a^{x+h}f(t)\ dt-\int_a^xf(t)\ dt}h=\lim_{h\to0}\frac1h\int_x^{x+h}f(t)\ dt$$
If we suppose the following statement, perhaps as axiom, that $\int_x^{x+h}f(t)\ dt=\int_x^{x+h}f_{avg}(x,x+h)\ dt$ where $f_{avg}(a,b)$ is the average value of $f$ for $a\le x\le b$, then,
$$g'(x)=\lim_{h\to0}\frac1h\int_x^{x+h}f_{avg}(x,x+h)\ dt=\lim_{h\to0}\frac1hf_{avg}(x,x+h)\int_x^{x+h}1\ dt\\=\lim_{h\to0}\frac1hf_{avg}(x,x+h)\cdot h$$
This integral is a trivial one that may be geometrically solved for, and from here, we see the $h$'s cancel, leaving us with
$$g'(x)=\lim_{h\to0}f_{avg}(x,x+h)\stackrel?=f_{avg}(x,x)=f(x)$$
which I suppose is what you want. Somewhere along the line though, we need continuity, which I suppose could come through with a limit property:
if $f(x)$ is continuous, then $\lim f(g(x))=f(\lim g(x))$.