Let $p:X\to Y$ be a closed continuous surjective map such that $p^{-1}(\{y\})$ is compact, for each $y\in Y$. (Such a map is called a perfect map) Show if $Y$ is compact, then $X$ is compact. [Hint: If $U$ is open set containing $p^{-1}(\{y\})$, there is a neighborhood $W$ of $y$ such that $p^{-1}(W)$ is contained in $U$]
My attempt: Inspired by James Dugundji, we first generalize hint:
Let $p: X\to Y$ be a closed map. If $S\subseteq Y$ and $U\in \mathcal{N}_{p^{-1}(S)}$, then $\exists V\in \mathcal{N}_S$ such that $p^{-1}(V)\subseteq U$.
Proof: $p^{-1}(S)\subseteq U\in \mathcal{T}_X$. $X-U$ is closed in $X$. Since $p$ is closed map, $p(X-U)$ is closed in $Y$. So, $Y-p(X-U)\in \mathcal{T}_Y$. Let $V= Y-p(X-U)$. We claim $S\subseteq V$. Assume towards contradiction, $\exists s\in S$ such that $s\notin V=Y-p(X-U)$. So $s\in p(X-U)$. $\exists x\in X-U$ such that $p(x)=s\in S$. Which implies $x\in p^{-1}(S)=\{z \in X|p(z)\in S\} \subseteq U$. $x\in U \cap (X-U)$. Thus we reach contradiction. Hence $S\subseteq V$. $p^{-1}(V)=p^{-1}(Y-p(X-U))=X- p^{-1}(p(X-U))\subseteq U$. Hence $\exists V\in \mathcal{N}_S$ such that $p^{-1}(V) \subseteq U$. This is precisely chapter 3 theorem 11.2 of Dugundji topology.
Let $U=\{ U_\alpha| \alpha \in J\}$ be an open cover of $X$. $p^{-1}(y)$ is compact, $\forall y\in Y$. $U$ is an open cover of $p^{-1}(y)$, $\forall y\in Y$. So $\exists \{U_{y, 1}, …,U_{y,n_y}\}$ finite subcover of $U$ in $p^{-1}(y)$. Let $U_y =\bigcup_{i=1}^{n_y} U_{y,i}$. By hint/chapter 3 theorem 11.2 of Dugundji topology, $\forall y\in Y$, $\exists V_y \in \mathcal{N}_y$ such that $p^{-1}(V_y)\subseteq U_y$. So $\{V_y| y\in Y\}$ is an open cover of $Y$. Since $Y$ is compact, $\exists \{ V_{y_1},…,V_{y_n}\}$ finite subcover of $Y$. $\bigcup_{i=1}^n V_{y_i}=Y$. So $p^{-1}(\bigcup_{i=1}^n V_{y_i})=p^{-1}(Y)=X =\bigcup_{i=1}^n p^{-1}(V_{y_i}) \subseteq \bigcup_{i=1}^n U_{y_i} $. Thus $X=\bigcup_{i=1}^n U_{y_i}= \bigcup_{y\in \{y_1,..,y_n\}, i\in J_{n_y}} U_{y,i}$. Hence $\{ U_{y, i}| y\in \{y_1,..,y_n\}, i\in J_{n_y}\}$ is finite subcover of $U$. Another way to write it, $\{ U_{y_k ,i}| i\in J_{n_{y_k}}, k\in J_n\}$. Is my proof correct?
Note: We only used $p^{-1}(y)$ is compact and $p$ is closed map conditions.