I have been asked to prove the following question for my Real Analysis course, and I'm not quite sure how to go about proving this. The textbook is Spivak's Calculus, and this is question 10 from Chapter 7. Thank you in advance!
Suppose $f,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]$.
My idea is that this problem will involve the intermediate value theorem, as $f$ holds values both less than and greater than $g$ for some $x$.