Let $f:X\to Y$ be a map between first countable Hausdorff spaces for which $f^{-1}(K)$ is compact, for all compact $K\subseteq Y$. Show that $f$ is a closed map.
My attempt:
Let $F\subseteq X$ be closed in $X$. I want to show that $Y\backslash f(F)$ is open in $Y$. Take $y\in Y\backslash f(F)$, then $\forall z\in f(F)\subseteq Y: z\ne y. $ Since $Y$ is Hausdorff, there exist $U_z, V_z \in \tau_Y$ such that $z\in U_z, y\in V_z, U_z \cap V_z =\emptyset$ (as this holds for all $z\in f(F)$, we will specify this $z$-dependency when writing down the Hausdorff sets). Now, I believe that $$ Y\backslash f(F) = \bigcup_{z\in f(F)} V_z \in \tau_Y.$$ Proof of the equality: Let $y\in Y\backslash f(F)$, then $y\in V_w$ for some $w\in f(F)$ because $Y$ is Hausdorff and $y\ne w$, which proves the $\subseteq$-inclusion. Now let $y$ be an element of the union, then there is some $z\in f(F)$ for which $y\in V_z\subseteq Y$. It remains to show that $y$ cannot be an element of $f(F)$. Suppose it is, then $V_z \cap f(F)\ne \emptyset$. Note that $U_z\cap f(F)$ is an open neighborhood of $z$ (in $f(F)$), for which the intersection with $V_z$ is empty (as $V_z$ and $U_z$ are disjoint, Hausdorff). Now, I'm stuck. I can't find an argument to show that this assumption will result in a contradiction. I haven't used the first countability and the compactness property of $f$ yet, but I can't find a good application for them.
I would like to know if my approach is correct, if so, how to finish the proof?
Thanks.
A correction of Sahiba's answer:
Suppose $F$ is closed and let $y \in \overline{f[F]}$. As $Y$ is first countable there is a sequence $y_n \in f[F]$ such that $y_n \to y$ in $Y$.
Then $K=\{y_n: n \in \Bbb N\} \cup \{y\}$ is compact (in any open cover some element covers $y$, and thus almost all $y_n$, by convergence, etc.). This holds in any space. Write $y_n = f(x_n), x_n \in F$.
Then $f^{-1}[K]$ is compact by assumption and so $(x_n)_n \subseteq f^{-1}[K]$ has a convergent subsequence $(x_{n_k})_k$ convergent to $x \in f^{-1}[K]$. (In $X$ compactness and sequential compactness are equivalent.) As $F$ is closed and all $x_n \in F$ we have that $x \in F$.
By continuity $y_{n_k}= f(x_{n_k}) \to f(x) \in f[F]$ but also $y_{n_k} \to y$ and so by Hausdorffness of $Y$ (this is where we use it) $y=f(x)$ so $y \in f[F]$. This shows that $f[F]$ is closed.