The following question is taken from Basic Topology by Armstrong:
Let $f$ be a closed map with the property that the inverse image of each point of $Y$ is a compact subset of $X$. Show that $f^{-1}(K)$ is compact whenever $K$ is compact in $Y$.
I've written my attempt at proving this problem below, but I'm not sure if it's completely correct (especially concerned about correctness near the end of the proof). Any comments/ideas for a nicer proof would be appreciated!
Proof. Let $\mathcal{U}$ be an open cover of $f^{-1}(K)$. Since $f^{-1}(\{y\})$ is compact for any $y \in Y$, we can reduce the cover above to $\{U_y\}$, where $U_y$ is a finite union of open sets in $\mathcal{U}$ such that $f^{-1}(\{y\}) \subseteq U_y$. Observe that $y \in f(U_y^C)^C$, and so $\{f(U_y^C)^C \cap K\}$ is an open cover of $K$. This reduces to a finite subcover by compactness of $K$, so $K \subseteq \bigcup_{i=1}^{n}f(U_{y_i}^C)^C$ for some $y_1, \dots, y_n \in Y$. Finally, observe that $f^{-1}(f(U_{y_i}^C)^C) = U_{y_i}$, and so $\{U_{y_i}\}$ is an open cover of $K$. By construction of $U_{y_i}$, $f^{-1}(K)$ is compact by definition. $\square$