Need to show that $\int_a ^b f(x)g(x)dx=0 \implies f\equiv 0$
The function $h(x) = f(x) f(1-x) $ looks a little like an upside-down bathtub: it's 0 for $x \le 0$ and for $x \ge 1$, but nonzero (indeed, positive) for $0 < x < 1$.
For any interval $[p, q]$, the function $h_{p, q} (x) = f(\frac{x-p}{q-p})$ is similar: it's nonzero on the interior of the interval, zero outside it.
If you scale it up by a constant, you can arrange that $\int_p^q h_{p,q}(x) = 1$.
You'd like to show that for any $c$ in $[a, b]$, $f(c) = 0$.
Suppose not .. suppose that $f(c) = A > 0$. Then there's an interval $[p, q]$, containing $c$, indeed, with $a < p < c < q< b$ on which $f(x) \ge A/2$. (Why?)
That tells you that $$ \int_a^b f(t) h_{p,q}(t)~dt = \int_p^q f(t) h_{p,q}(t) dt \ge \int_p^q \frac{A}{2} h_{p, q}(t) ~ dt. $$ What can you say about that last integral? How does this related to the claim about $f$ and "any $g$"?
Suppose that $f(y) \neq 0$ for some $y \in [a,b]$, without loss of generality, $f(y) > 0$. Then for some $\delta > 0$, $f(x) > 0$ for $x \in (y-\delta, y+\delta)$, and assume that $\delta$ is such that this interval is still contained in $[a,b]$ (if not, we are free to make it smaller).
Let $G(x) = \exp\left( \frac{1}{1-x^2} \right)$ for $x \in (-1,1)$ and $G(x)=0$ for $|x| > 1$. Then we make $g(x) = G(\frac{x-y}{\delta})$. Now we have a compactly supported function $g$ whose support is exactly $(y-\delta, y+\delta)$, and $g$ is strictly positive on $(y-\delta, y+\delta)$.
What can we say about $$\int_a^b f(x)g(x) dx = \int_{y-\delta}^{y+\delta} f(x)g(x) dx?$$