Give another proof of intermediate value theorem 
Give another proof of intermediate value theorem by completing the
  following argument: If $f$ is a continuous real-valued function on the
  closed interval $[a,b]$ in $\mathbb{R}$ and $f(a)<\gamma < f(b)$ then
  $$f(\sup \{x\in [a,b]: f(x)\le \gamma\})=\gamma \mbox{.}$$

Denote $S=\{x\in [a,b]: f(x)\le \gamma\}$. First note that $\sup S$ exists since $a\in S$ and $S$ is bounded from above by $b$. Since $S$ is closed (because of the continuity of $f$) it must be the case that $s=\sup S \in S$. If $f(s)<\gamma$ then there would exist some small $\epsilon>0$ such that $f(s + \epsilon)<\gamma$ and that would mean $s$ is not the supremum of $S$, contradiction. Thus $f(s)=\gamma$.
Is my reasoning correct?
 A: Your main reasoning is correct, but the wording is a bit off, and a few details in how you think.
Note that $b \notin S$, which means that $s < b$, which is important, and similarily, $a < s$. What you use $\epsilon$ for, we usually denote by $\delta$. A more conventional $\epsilon$ would be $\gamma - f(s)$. Here is how I would word the proof:
Let $S= \{x\in [a,b]: f(x)\le \gamma\}$. Set $s = \sup S$. Note that we have $a< s < b$ (a small $\epsilon$-$\delta$ argument is technically needed here too, both for $a<s$ and for $s<b$), and for all $x>s$, $f(x) > \gamma$. Now we show that we can have neither $f(s) > \gamma$ nor $f(s) < \gamma$.
If $f(s) < \gamma$, then by the $\epsilon$-$\delta$ definition of continuity, setting $\epsilon = \gamma - f(s)$, there is a $\delta > 0$ such that $f(s + h) > \gamma$ for all $h$ with $|h|< \delta$. Specifically, for $h = \min((b-s)/2, \delta/2)$, we see that $s$ cannot be an upper bound of $S$, since $s+h \in S$. (The fact the $s < b$ is needed to have some wiggle room to find an $h$ that gives a contradiction)
If $f(s) > \gamma$, then we have $s \notin S$. But $S$ is closed, being the inverse image of the closed interval $[f(a), \gamma]$, so that cannot be the case.
Since we have neither $f(s) < \gamma$ not $f(s) > \gamma$, we must have $f(s) = \gamma$, and we are done.
A: You need to state that $s < b$, which follows from $\gamma < f(b)$ and the definition of S. That's what entitles you to say that there's a positive $\varepsilon$ such that $f(s+\varepsilon) < \gamma$, if $f(s) < \gamma$.
You should also address the possibility of $f(s) > \gamma$. It's easily handled: there is a sequence $(s_n)$ in S converging to $s$, and $f(s_n)\le \gamma$ for all $n$, so by continuity $f(s) = \lim_n f(s_n) \le \gamma$.
A: The only thing that is missing is that you need to show that
$\sup S < b$.
Note that $S$ is compact (closed & bounded) hence $\sup S \in S$
and so $f(\sup S) \le \gamma$. Since $f(b) > \gamma$, we conclude
that $\sup S < b$.
Suppose $f(\sup S) < \gamma$. Then, since $f$ is continuous, and
$\sup S < b$, there is some $\delta>0$ such that $[\sup S, \sup S + \delta) \subset [a,b]$ and
$f(\sup S + t) < \gamma$ for $t \in [0,\delta)$, hence
contradicting the definition of $\sup S$.
