how
Suppose that V is a subset. By the continuity of f we have is closed in X (f^-1 from Y to X maps closed/open sets to closed/open sets resp.).
Notice that . As the closure is the smallest closed superset of V we have . Now take f of both sides to get the result.
You don't need completeness (or the fact that it is a metric space).