Let $f,g$ be continuous functions. If we can always can get x,y s.t. $f(x)<g(x)$ and $g(y)<f(y)$, prove that $f(a)=g(a)$. The whole question: Let $f,g:X\rightarrow \mathbb{R}$ be continuous at $a$. Supposing that for every neighborhood $V$ of $a$ exists points $x,y$ such that $f(x)&lt;g(x)$ and $g(y)&lt;f(y)$, prove that $f(a)=g(a)$.

I'm stuck. I've tried to fix some $\epsilon$ and by continuity get some neighborhood of $a$ and so get the points $x,y$ given by hyphotesis. But i couldn't work with them succesfully. I also tried the contrapositive, but i couldn't go much further.

Any hints on how to solve this problem?
Consider the continuous function $h(x) = f(x) - g(x)$ over $X$.  We note that $\lim_{x \to a}h(x) = h(a)$, call this limit $L$.  Every neighborhood of $a$ contains an $x,y$ such that $h(x) &lt; 0 &lt; h(y)$.  However, by the definition of a limit: for any $\epsilon &gt; 0$, we can select a neighborhood $V$ such that the $x,y \in V$ must also satisfy $|h(x) - L|&lt; \epsilon$ and $|h(y) - L| &lt; \epsilon$.  

Thus, for every $\epsilon &gt; 0$, we have $-\epsilon &lt; L &lt; \epsilon$.
Let $ h(x) = f(x) - g(x)$. Consider intervals $(a -1/n ,a + 1/n)$ around a .
Thus by intermediate value theorem on the intervals we get a sequence of $ b_n$ such that $h(b_n) = 0$. Now the intersection of these intervals is just one point a and $ b_n \to a$, thus $h(a) = 0 \Rightarrow f(a) = g(a)$