Suppose $f$ and $g$ are continuous on $[a,b]$ and that $f(a) < g(a)$ but $f(b) > g(b)$. Prove that $f(x) = g(x)$ for some $x \in [a,b]$.
I did try and actually did get as far as coming up with $f-g$. Would I set $h(x)= f(x)- g(x)$ and say $h(a) <x< h(b)$?