Let $ f(x), g(x) $ be continuous functions from $ [a, b] $ onto $ [c, d] $.
I want to prove that there exists a $ c \in [a, b] $ such that $ f(x) = g(x) $. Can you verify my proof?
Define $ h(x) = f(x) - g(x) $, which is well-defined on $ [a, b] $ and is continuous as the difference of two continuous functions.
$ f $ is surjective and therefore, there exists $ x_1 $ such that $ f(x_1) = d $, and from the definition of a closed interval, we can see that $ g(x_1) \le d $. If $ g(x_1) = d $, then $ f(x_1) = g(x_1) $ and we're finished. If $ g(x_1) \lt d $, then $ h(x_1) \gt 0 $.
$ g $ is surjective and therefore, there exists $ x_2 $ such that $ g(x_2) = d $, and from the definition of a closed interval, we can see that $ f(x_2) \le d $. If $ f(x_2) = d $, then $ f(x_2) = g(x_2) $ and we're finished. If $ f(x_2) \lt d $, then $ h(x_2) \lt 0 $.
From the $ \text{Intermediate Value Theorem} $, we can conclude that there exists a $ c $, such that $ h(c) = 0 \Rightarrow f(c) - g(c) = 0 \Rightarrow f(c) = g(c) $.
Assume by contradiction that $f(x)\neq g(x)$ for any $x$ in $[a,b].$ Then $f(x)<g(x)$ for any $x$ (or $g(x)<f(x)$ for any $x$) by the intermediate value theorem. We have $f(x_0)=d$ for some $x_0.$ Hence $d=f(x_0)<g(x_0),$ a contradiction.
Remark The proof makes use of the property that $d$ is the greatest value of both functions. No surjectivity is needed. Similarly it suffices that $c$ is the least value of both functions.