Consider the function $h(x) = f(x)*(g(b) - g(a)) - g(x)*(f(b) - f(a))$ on $[a, b]$. Then:
$$
h(a) = f(a)g(b) - f(a)g(a) - g(a)f(b) + g(a)f(a) = f(a)g(b) - f(b)g(a),
$$
and
$$
h(b) = f(b)*(g(b) - g(a)) - g(b)*(f(b) - f(a)) = f(a)g(b) - f(b)g(a).
$$
We see that $h(a) = h(b)$, so by Rolle's theorem: there is a $c \in (a, b)$ such that $h'(c) = 0$. So:
$$
f'(c)*(g(b) - g(a)) - g'(c)*(f(b) - f(a)) = 0 ,
$$
and we have:
$$
\frac{f'(c)}{g'(c)} = \frac{f(b) - f(a)}{g(b) - g(a)}.
$$
The mean value theorems you cite apply to integrals over bounded intervals, so some additional analysis is required.
Note that the integral $\int_0^\infty f(x) e^{-x} \, dx$ is convergent by the Weierstrass test.
Let $m = \inf_{x \in[0,\infty)} f(x)$ and $M = \sup_{x \in[0,\infty)} f(x)$. Since $me^{-x} \leqslant f(x)e^{-x} \leqslant Me^{-x}$, we have
$$m = \int_0^\infty me^{-x} \, dx \leqslant I = \int_0^{-\infty}f(x) e^{-x} \, dx \leqslant \int_0^\infty Me^{-x} \, dx = M,$$
and $m \leqslant I \leqslant M$.
If $m < I < M$ then there exist $a$ and $b$ such that $m \leqslant f(a) < I < f(b) \leqslant M$. (This is a basic property of the infimum and supremum.) By the familiar intermediate value theorem -- which applies to continuous functions on compact intervals -- there exists $c \in (a,b) \subset [0,\infty)$ such that
$$f(c) = I = \int_0^\infty f(x) e^{-x} \, dx.$$
See if you can handle the cases where $I = m$ and $I = M$.
Hint: If $I = m$ then $\int_0^\infty [f(x) - m]e^{-x} \, dx = 0$ where $f(x) - m \geqslant 0$.
Best Answer
I mentioned in a comment that you need more requirements on $f$ than just that is continuous. To give you a verbal explanation of the theorem I will assume it is non-decreasing. Then you can look at it as follows:
Since $f$ is non decreasing, $f(a)$ must be the minimum of $f$ over the interval, and $f(b)$ must be the maximum. Now it must be true that: $$\int_a^b f(x)g(x)dx \geq f(a) \int_a^b g(x) dx$$ and $$\int_a^b f(x)g(x)dx \leq f(b) \int_a^b g(x) dx$$
Now consider the function $F$ of $c$ given by $$F(c) = f(a)\int_a^c g(x)dx + f(b)\int_c^b g(x) dx$$ This function must satisfy $F(b) \leq \int_a^b f(x)g(x)dx$ and also $F(a) \geq \int_a^b f(x)g(x)dx$. Since it is continuous there must be a $c^*$ where equality holds. (By the intermediate value theorem).
So to put it in words. If you integrate a function $g$ from $a$ to $b$ and weight it by an increasing function $f$, then the weighted integral must be greater than the integral of $g$ times $f$'s min and less than the integral times $f$'s max. So there must be a point in between where $f$s min times some of $g$'s integral plus $f$'s max times the rest of $g$'s integral equals the total weighted integral.