Let f,g be continous functions from X to Y. Let E be a dense subset of X. Show if $f(x)=g(x) \forall x \in E$, then f(x)=g(x) $\forall x \in X$. I'm trying to prove that if f,g are continuous functions, and if E is a dense subset of X $(\text{or } Cl(E) = X)$ and if $f(x)=g(x) \forall x \in E$ then $f(x)=g(x) \forall x \in X$. 
I understand that if f,g are continuous, then:

$\exists \delta_1, \delta_2$ such that $\forall X \in E$ with $d(x,p)< \delta_1$, $|f(x) - f(p)| < \epsilon$ and similarly $\forall X \in E$ with $d(x,p)< \delta_2$, $|g(x) - g(p)| < \epsilon$

And by definition of closure, I know that:

$Cl(E) = E \cup E'$ where E' is the set accumulation points of E, where p is an accumulation point if $\forall r>0, (E\cup N_r(p)) \backslash \{p\} \neq \emptyset $

I have zero clue on how to approach this problem. If $f(x) = g(x)$, then I'm guessing it implies that $|f(x) - f(p)| = |g(x) - g(p)|$. And so I'm guessing that $\delta_1 = \delta_2$. 
Help would be very much appreciated. 

A little bit late, but I decided to give an alternate answer without using contradiction or the sequence definition of continuity. Let $p \in X$ and $\epsilon > 0$ be given.  If $p \in E$ we are done, otherwise $p$ is a limit point of $E$.  By continuity of $f, g$, there exists $\delta_1, \delta_2 >0$ s.t. $\forall x \in X$ we have $d(p,x) < \delta_1 \implies d(f(x), f(p)) < \epsilon/2$ and $d(p, x) < \delta_2 \implies d(g(p), g(x)) < \epsilon/2$.  Set $\delta = \min\{\delta_1, \delta_2\}$.  Since $E$ is dense in $X$, there is some $q \in E \cap B_{\delta}(p) \backslash \{p\}$. Thus, we have that $d(f(p), g(p)) \leq d(f(p), f(q)) + d(f(q), g(q)) + d(g(q),g(p)) < \epsilon$.  Finally, since $\epsilon$ was arbitrary, we conclude that $d(f(p), g(p)) = 0 \implies f(p) = g(p)$ for all $p \in X$.
Note: $d(f(q), g(q)) = 0$ since $f,g$ agree on $E$ by hypothesis.
