My proof:
I shall use the fact that the image of a closed interval under a continuous function is a closed interval (this follows from the Extreme and Intermediate Value Theorems).
Let $c,d\in (a,b)$, $c. Then $f([c,d])=[m_1,M_1]$. Because $\lim_{x\to a^+}f(x)=+\infty$, $\exists \delta>0:aM_1$. We also have that $f([a+\delta,c])=[m_2,M_2]$. Taking $m=\min\left\{M_1,M_2\right\}$ yields that $f((a,c])=[m,+\infty)$. Similarly, $f([c,b))=[m^{\prime},+\infty)$. The proof is complete if we take the minimum of the two $m,m^{\prime}$.
Can this argument be simplified?
EDIT: We can possibly have that $a=-\infty$ or $b=+\infty$
calculus
real-analysis
continuity