Let $f: X \rightarrow Y $ and $g:X \rightarrow Y$ continuous functions and $(X,d_X),(Y,d_Y)$ metric space. Let $E$ be a dense subset in $X$. Prove that $f(E)$ is a dense subset in $f(X)$. If $f(p)=g(p)$ for all $p\in E$, prove that $f(x)=g(x)$ for all $x\in X$.
My attempt: since $E \subset X \Rightarrow f(E)\subset f(X)$ and from the dense property we have $f(X) \subset f(\overline{E})$ and since $f$ is continuous, $f(X) \subset f(\overline{E}) \subset \overline{f(E)}$. Then, $f(E)$ is dense in $f(X)$.
Suppose that $f(p)=g(p), \; \forall p \in E$. Hence, we have
$$d_{Y}(f(x),g(x)) \leq d_{Y}(f(x),f(p)) + d_{Y}(f(p),g(x)) = d_{Y}(f(x),f(p)) + d_{Y}(g(p),g(x)).$$ By the fact that $f,g$ are continuous, there exist a $\delta_1$ and $\delta_2$ such that $$d_X(x,p) < \delta_1 \qquad d_X(x,p) < \delta_2$$
implies $$d_{Y}(f(x),f(p))<\epsilon /2 \qquad d_{Y}(g(p),g(x)) < \epsilon /2.$$ for all $\epsilon >0.$
Is this correct?