$f$ and $g$ are continuous mapping of a metric space X into metric space Y and $E$ is dense subset of X. (a)Prove that $f(E)$ is dense in f(X). (b)If $g(p)=f(p)$ for all $p\in E$, prove that $g(p)=f(p)$ for all $p\in X$.
My attempt: Part(b) since $g(p)=f(p)$ for all $p\in E$, we have $f(E)=g(E)$. So their limit points are equal.$\overline{f(E)} = f(E) \cup (f(E))^\prime$ and $\overline{g(E)} =g(E)\cup (g(E))^\prime$. So $\overline{f(E)} = \overline{g(E)}$. $f(E)$ and $g(E)$ are dense in $f(X)$ and $g(X)$ respectively. Thus, $f(X)=g(X)$.
Question:
Is this proof correct? I don’t think so, because it doesn’t explicitly show $f(p)=g(p),\forall p \in X$. Can this solution be modified or improve to make it work.
In part(a) how should I show $\overline{f(E)} \subseteq f(X)$?