I am trying to understand this proof and everything was pretty well until the last part of the second paragraph.
...Since $Y$ is compact, we can choose a finite subcover $W_{y_1},...,W_{y_m}$ covering $Y$. Then the collection $V_{y_1},...,V_{y_m}$ covers $X$...
I am having difficulties understanding the bold text.
I have done this to try to understand it. $$f(V_y)=\bigcup_{j=1}^mf(U_{i_j})\supset\bigcup_{i=1}^m W_{y_i}=Y=f(X)...(1)$$ $$X=\bigcup_{i=1}^mV_{y_i}...(2)$$
My question is how do you pass form (1) to (2) ?

I think that in the second part the phrase:
"the sets $p(V_{y})$ each contain some open neighborhood $W_y$ of $y$..."
must be replaced by the stronger statement:
"for every set $V_{y}$ we can find an open neighborhood of $W_y$ of $y$ such that $p^{-1}(W_{y})\subseteq V_{y}$...".
Let $x\in X$.
Then $p(x)\in Y=\bigcup_{i=1}^m W_{y_i}$ so $p(x)\in W_{y_i}$ for some $i\in\{1,\dots,m\}$.
Then $x\in p^{-1}(W_{y_i})\subseteq V_{y_i}$ because the $W_{y_i}$ are chosen in such a way that $p^{-1}(W_{y_i})\subseteq V_{y_i}$.
The fact that is is possible has been proved in the first part.
Proved is now that the sets $V_{y_1},\dots V_{y_m}$ cover $X$.