Trying to take a different approach in proving if $f:[a,b] \rightarrow \mathbb{R}$ is continuous and injective, then the maximum value of $f$ must occur at $a$ or $b$. trying to prove this by using the intermediate value theorem.
Here is what I have so far:
Let $a$,$b \in \mathbb{R}$ Assume to the contrary that the max value occurs at an interior point of the interval $[a,b]$. Let $x_\circ$ equal this interior point.
The first case would occur when $f(a) < f(b)$ then $f(a) < f(b) < f(x_\circ)$ If we consider $y_\circ \in ( f(b), f(x_\circ))$ is there a way to show that $y_\circ$ has at least 2 preimages by applying the intermediate value theorem?
Of course the second case would be $f(b) < f(a)$...
Yes! You're very close. Notice first that you only really need to show this for the first case by symmetry, since the second case is virtually the same. Or instead, just say $c = \max(f(a), f(b))$ and deal with both at once.
Now, take $z \in (c, f(x_0))$. We have that $f(a) < z < f(x_0)$, and $f(b) < z < f(x_0)$, so what can we say about the preimage of $z$?