Solution (source code)

= Solution

The decisive use of hypothesis (ii) is a neighbourhood construction: for any open $V\subseteq X$ containing a fibre $f^{-1}(\{y\})$, a <closed map> gives
$$
\boxed{W=Y\setminus f(X\setminus V)\text{ open},\qquad y\in W,\qquad f^{-1}(W)\subseteq V}.
$$
Indeed, $X\setminus V$ is <closed set>, its image is <closed set>, and $y$ cannot be in that image. A point of $f^{-1}(W)$ cannot lie outside $V$. Applying this to the finite union covering each <compact> fibre supplies a whole neighbourhood of that fibre's value using the same finitely many cover elements. <Compactness> of $K$ selects finitely many such neighbourhoods and hence a finite subcover of $f^{-1}(K)$, proving the desired <compact-preimage theorem for closed maps>.

The <closed map> assumption cannot simply be omitted. Give $X=\{0,1,2,\ldots\}$ the <discrete topology> and $Y=\{0\}\cup\{1/n:n\geq1\}$ the usual <subspace topology> from $\mathbb R$. The bijection $f(0)=0$, $f(n)=1/n$ is <continuous>, and all its fibres are <compact> singletons. But $Y$ is <compact> whereas $f^{-1}(Y)=X$ is an infinite discrete space, which is not <compact>. The map is not <closed set>, since the closed subset $\{1,2,\ldots\}$ has image $\{1,1/2,\ldots\}$, missing its limit point $0$.