Here is rudin's statement
Theorem 4.8 A mapping $f$ of a metric space $X$ into a metric space $Y$ is continuous if and only if $f^{-1}(V)$ is open in $X$ for every open set $V$ in $Y$.
Theorem 4.8 (corollary) A mapping $f$ of a metric space $X$ into a metric space $Y$ is continuous if and only if $f^{-1}(C)$ is closed in $X$ for every closed set $C$ in $Y$.
This follows from the theorem, since a set is closed if and only if its complement is open, and since $f^{-1}(E^{c})=[f^{-1}(E)]^{c}$ for every $E \subset Y$
Here is my question
We know it is $X$ mapping into $Y$, then $f(X)\subset Y$, maybe Y contains some elements $\notin f(X)$
I want to know should these elements be considered in $V$ and $C$?