Prove that the map $M:C(Y,Z) \times C(X,Y) \rightarrow C(X,Z)$ is continuous. Let $X,Y,Z$ locally compact Hausdorff spaces.Prove that the map $M:C(Y,Z) \times  C(X,Y)  \rightarrow C(X,Z)$ given  by $M(f,g)=f\circ g$ is continuous.
Attempt
Let $[K,U]$ open element of the subbase for $C(X,Z)$ where $K$ is compact subsetof $X$ and  $U$ open such that $U \subset Y$ we must prove that $M^{-1}([K,U])$
$$M^{-1}([K,U])=\lbrace (f,g)\in C(Y,Z) \times  C(X,Y)  \mid f\circ g\in [K,U]\rbrace $$
From here $f(g(K))\subset U$ for $K\subset X$ compact and open $U\subset Z$.
Frome here I don´t know how to follow the proof since I don´t know how it condition restringes our $f$ and $g$.Any Idea of how I should start was
very helpful.
 A: It turns out that you only need the fact that $X, Y$ are locally compact and Hausdorff $(*)$. Here are two key properties that I'll be using. For reference, I am using the notation and ideas from Tammo tom Dieck's Algebraic Topology. Specifically, this is chapter 2 section 4.

*

*If $X$ is locally compact and Hausdorff and $Y$ is any space then the evaluation map $e_{X, Y}: C(X, Y) \times X \longrightarrow Y$ via $(f, x) \mapsto f(x)$ is continuous


*For any two spaces $Y, Z$ where $e_{Y, Z}$ is continuous, there is a bijection between $C(X \times Y, Z) \longrightarrow C(X, C(Y, Z))$ via "currying." That is, a map $f: X \times Y \longrightarrow Z$ yields a map $f^{\wedge}: X \longrightarrow C(Y, Z)$ via $f^{\wedge}(x)(y) = f(x, y)$. The inverse is given by $g \mapsto g^\vee$ where $g^\vee: X \times Y \longrightarrow Z$ is defined as $g^\vee(x, y) = g(x)(y)$. In other words, $g^\vee = e_{Y, Z} \circ (g \times id_Y)$. These maps are easily checked to be inverses between $Set(X \times Y, Z) \longrightarrow Set(X, Set(Y, Z))$, where $Set(A, B)$ is the set maps between $A$ and $B$. So what this statement really says is that these inverse functions restrict to the continuous case, i.e. that $f$ continuous implies $f^\wedge$ continuous and $g$ continuous implies $g^\vee$ continuous.
I'll defer the proof of these two facts until the end of my post. You can also read the reference yourself here. Taken these as a given, let's proceed with the problem at hand.
Let $X, Y$ be locally compact and Hausdorff and $Z$ arbitrary. Then we want to show continuity of the map $M: C(Y, Z) \times C(X, Y) \longrightarrow C(X, Z)$. By fact 1 above, the evaluation map $e_{X, Z}$ is continuous as $X$ is locally compact and Hausdorff. Then by fact 2, for any space $A$, we have our bijection $C(A, C(X, Z)) \longrightarrow C(A \times X, Z)$ taking $\phi \mapsto \phi^\vee$. In particular, take $A = C(Y, Z) \times C(X, Y)$. Then we have that $M: C(Y, Z) \times C(X, Y) \longrightarrow C(X, Z)$ is continuous if and only if $M^\vee: C(Y, Z) \times C(X, Y) \times X \longrightarrow Z$ is continuous.
Let's compute then what $M^\vee$ is. For $(f, g) \in C(Y, Z) \times C(X, Y)$ and $x \in X$, the definition above tells us that $M^\vee((f, g), x) = (M(f, g))(x) = f(g(x))$. We can decompose $M^\vee$ as the following composition:
\begin{align*}
C(Y, Z) \times C(X, Y) \times X &\longrightarrow C(Y, Z) \times Y &\longrightarrow Z\\
(f, g, x) &\mapsto (f, g(x)) &\mapsto f(g(x))
\end{align*}
Sorry for the poor formatting. The first map $(f, g, x) \mapsto (f, g(x))$ is just $id_{C(Y, Z)} \times e_{X, Y}$, which is continuous by local compactness and Hausdorffness of $X$ and fact 1 above. The second map is $e_{Y, Z}$, which is continuous by local compactness and Hausdorffness of $Y$ and fact 1 above. Hence, $M^\vee = e_{Y, Z} \circ (id_{C(Y, Z)} \times e_{X, Y})$ is continuous, so $M = M^{\vee \wedge}$ is continuous by fact 2.
Now let's prove these two facts, which are largely why the compact open topology is so useful.

*

*Let's consider $e_{X, Y}: C(X, Y) \times X \longrightarrow Y$. Take some $f(x) = e_{X, Y}(f, x)$ and an open neighborhood $f(x) \in U \subseteq Y$. By continuity, $f^{-1}[U] \subseteq X$ is open. By local compactness and Hausdorffness of $X$, there is some compact neighborhood $x \in K \subseteq f^{-1}[U]$. Hence, $f[K] \subseteq U$ so $f \in [K, U]$. Then $e_{X, Y}^{-1}[U]$ contains the neighborhood $[K, U] \times K$ of $(f, x)$. Thus, we have continuity.


*As discussed, we need only show that $f$ continuous implies $f^\wedge$ continuous and $g$ continuous implies $g^\vee$ continuous. Let's begin with some $f: X \times Y \longrightarrow Z$ continuous and consider $f^\wedge: X \longrightarrow C(Y, Z)$. Take a subbasic element $[K, U] \subseteq C(Y, Z)$ and suppose that $x \in (f^\wedge)^{-1}[[K, U]]$. Then $f^\wedge(x) \in [K, U]$, so for all $y \in K$ $f^
\wedge(x)(y) \in U$. Of course, this means that $f[\{x\} \times K] \subseteq U$. Thus $\{x\} \times K \subseteq f^{-1}[U]$. As $f^{-1}[U]$ is open in the product topology, for every $(x, y)$ with $y \in K$ there is a basic open neighborhood $(x, y) \in V_x \times V_y \subseteq f^{-1}[U]$. By compactness, we can cover $K$ by finitely many $V_{y_1}, \dots, V_{y_n}$. Let $V = V_{x_1} \cap \dots \cap V_{x_n}$. This is an open neighborhood of $x$. Then $V \times (\bigcup_{i=1}^n V_{y_i})$ is an open neighborhood of $\{x\} \times K$ Furthermore, take some $(a, b) \in V \times (\bigcup_{i=1}^n V_{y_i})$. Then $b \in V_{y_i}$ some $i$ so $(a, b) \in V_{x_i} \times V_{y_i} \subseteq f^{-1}[U]$. Point being, we have found a neighborhood $\{x\} \times K \subseteq V \times (\bigcup_{i=1}^n V_{y_i}) \subseteq f^{-1}[U]$. Thus, $V \times K \subseteq V \times (\bigcup_{i=1}^n V_{y_i}) \subseteq f^{-1}[U]$ so $f^\wedge[V] \subseteq [K, U]$. Thus, $x \in V \subseteq (f^\wedge)^{-1}[[K, U]]$ so $f^\wedge$ is continuous. Note that we made no assumptions on $X, Y, Z$ is this direction.
Thankfully the other direction is much easier. Let $g: X \longrightarrow C(Y, Z)$ be continuous. Then $g^\vee = e_{Y, Z} \circ (g \times id_Y)$. Indeed, evaluating the right hand side at $(x, y)$ yields $e_{Y, Z}(g(x), y) = g(x)(y) = g^\vee(x, y)$. We assumed that $e_{Y, Z}$ was continuous so $g^\vee = e_{Y, Z} \circ (g \times id_Y)$ is continuous as well.
EDIT: $(*)$ By the way, depending on your definition of locally compact, you can drop the Hausdorff assumption. Since you explicitly mention Hausdorffness, I assume that to you a locally compact space is one such that every point has a compact neighborhood. If we in addition have Hausdorffness then every neighborhood of a point contains a compact neighborhood within it. We only need this property, not the stronger fact that $X, Y$ are Hausdorff as well. In the book I reference by Tammo tom Dieck, a locally compact space is one where every neighborhood of a point contains a compact nieghborhood within it. There are non-Hausdorff spaces satisfying this form of local compactness, such as the Sierpinski space.
