The problem:
Let $f$ and $g$ be continuous functions defined on an open interval $I$. Let $a\in I$ such that $f(a)<g(a)$. Show that there exists an open interval $J\subset I$ with $a\in J$ such that $f(x)<g(x)$ for all $x\in J$
I'm honestly struggling to even conceptualize what this problem is asking me to prove let alone to how start proving it. Can anyone guide me or help me through?
$h(x)=g(x)-f(x)$. $h$ is continuous on $I$ and $h(a)>0$. Since $h$ is continuous, in particular at $a$, we have $$\lim_{k\to 0}h(a-k)=\lim_{x\to a^-}h(x)=h(a)=\lim_{x\to a^{+}}h(x)=\lim_{k\to 0}h(a+k)$$
We see that for $k>0$, $$\quad h(a-k)< h(a)< h(a+k)\implies h(x)>0\;\text{for}\;x\in(a,a+k)\subset I$$