Let $(X,d)$ and $(Y,d')$ be metric spaces and $f:X \longrightarrow Y$ a continuous function. I need to show that, if $X$ is separable, so the image of $f$, with $d'$, is separable too.
I've though in showing it by using the fact that, if $X$ is separable, then there existis an open base of $(X,d)$ that is countable. Since I already know that $(X,d)$ is separable, there is an bijection $\phi: \mathbb{N} \longrightarrow X$ in the form $\phi(n)=B(a_n,\delta)$ and, as $f$ is continuous, it takes the $B(a_n, \delta)$ to $B(f(a_n), \varepsilon)$. With that, I've though to say that there is a bijection $\pi=f \circ \phi: \mathbb{N} \longrightarrow Y$ in the form $\pi(n)=B(f(a_n),\varepsilon)$ to show that that base of $f(X)$ is countable, but i'm unsure if this is enough, or even right to conclude.
I feel that the proof using general topology is much simpler and more intuitive.
Let $X$ and $Y$ be topological spaces and $f: X \rightarrow Y$ a continuous function. We want to show that if $X$ is separable then $f(X)$ is separable.
By separability of $X$, there is a countable subset $S \subset X$ that is dense in $X$, that is, any open set $U \subset X$ has nonempty intersection with $S$. Then, $f(S)$ will be dense in $f(X)$: if $V \subset f(X)$ is open, its preimage $f^{-1}(V)$ is open by continuity of $f$, thus $f^{-1}(V)$ contains some element $s \in S$, but this means that $f(s) \in V$. So, any open subset of $f(X)$ contains an element from $f(S)$. Since $S$ is countable, $f(S)$ is countable, too.
We proved that $f(S)$ is countable and dense in $f(X)$. Thus, $f(X)$ is separable.