Be $f:\Bbb R \to \Bbb R$, a continuous function, $ I=(a,b)\subset\Bbb R$ an open interval. Prove that if $f(p)\in I,$ then $\exists U\subset\Bbb R$ environment of $p$ such that $f(x)\in I\forall x \in U$.
I think I can use uniform continuity, but I do not know how to do it.
Uniform continuity is not needed; plain and ordinary continuity at $p$ will get the job done; here I'll use the usual $\epsilon$-$\delta$ definition:
Since $I = (a, b) \subset \Bbb R$ is open and $f(p) \in I$, there is an $\epsilon > 0$ such that
$(f(p) - \epsilon, f(p) + \epsilon ) \subset (a, b) = I; \tag 1$
then since $f$ is continuous, there is some $\delta > 0$ with
$\vert f(x) - f(p) \vert < \epsilon \tag 2$
provided
$\vert x - p \vert < \delta; \tag 3$
now take
$U = (p - \delta, p + \delta); \tag 4$
it is easy to see that
$U = \{ x \in \Bbb R \mid \vert x - p \vert < \delta \}; \tag 5$
therefore, if $x \in U$, (3) binds so we have
$\vert f(x) - f(p) \vert < \epsilon; \tag 6$
then
$f(x) \in (f(p) - \epsilon, f(p) + \epsilon) \subset (a, b) = I, \tag 7$
just as we wanted to prove.