I'm trying to prove the following theorem.
The topological space $X$ is called locally compact if every $x \in X$ has a neighborhood $U$ such that $\text{Cl} \ U$ is compact. Let $X, Y, Z$ be topological spaces and $Y$ is Hausdorff and locally compact. Prove that the composition map $$ \Sigma: C(X, Y) \times C(Y, Z) \rightarrow C(X, Z), \quad (f, g) \mapsto g \circ f $$ is continuous (in compact-open topologies).
Here is the beginning of my proof:
Let $\psi \in W(K_x, U_z) = \{f \in C(X, Z)\ \ | \ f(K_x) \subset U_z \}$ where $K_x \subset X$ is some compact set and $U_z \subset Z$ is some open set (so $\psi$ lies in some element of subbase of compact-open topology in $C(X, Z)$). Take any
$$(f, g) \in \psi^{-1} = \{(f, g) \in C(X, Y) \times C(Y, Z) \ | \ g \circ f = \psi\}$$ Then $f(K_x) \subset g^{-1}(U_z)$. But $g^{-1}(U_z)$ is open in $Y$, so $f \in W(K_x, g^{-1}(U_z))$ and thereby $f$ lies in some element of subbase in C(X, Y).
I was thinking the next step is to show that $g$ lies in some element of subbase of compact-open topology on $C(Y, Z)$ and then use the definition of product topology. I took $f(K_x)$ which is compact in $Y$ and said that $g \in W(f(K_x), U_z)$ which is an element of subbase on $C(Y, Z)$. But there is no usage of the fact that $Y$ is Hausdorff of locally compact. Proofs I've seen (https://math.stackexchange.com/a/49489/538712 and proof in Viro et al.) construct some compact neighborhood of $f(K_x)$. I don't understand why we can't just take $K_x$ and proceed as in my proof.