Basis for the compact-open topology of $\mathcal{C}(X,Y)$ with $X$ being locally compact Hausdorff Suppose $X$ is locally compact Hausdorff space, $\mathcal{B}$ a basis of a space $Y$. Show that compact-open topology on $\mathcal{C}(X,Y)$ has a basis consisting of the elements $S(C,B)$, where $C$ is compact and $B\in\mathcal{B}$.
As the first step we shall show for any $f\in\mathcal{C}(X,Y)$, there exists $S(C,B)$ such that $f\in S(C,B)$. That is, we need to find a compact set in $X$ and a basis element in $Y$ such that $f(C)\subseteq B$.
Since each $B$ is open in $Y$ and $f$ is continuous, we know $f^{-1}(B)$ is open in $X$. By theorem $29.2$ from the textbook, there exists $V$ such that $V\subset \overline{V}\subset f^{-1}(B)$ and $\overline{V}$ is compact. So we have
\begin{equation*}
    f(\overline{V})\subset f(f^{-1}(B))\subseteq B\Rightarrow f\in S(\overline{V},B)
\end{equation*}
The first property of basis is verified. Now we show if $f\in S(C_1,B_1)\cap S(C_2,B_2)$, then there exists $S(C_3,B_3)$ such that $f\in S(C_3,B_3)\subset S(C_1,B_1)\cap S(C_2,B_2)$. There is
\begin{equation*}
    f(C_1)\subset B_1, f(C_2)\subset B_2
\end{equation*}
\begin{equation*}
    \Downarrow
\end{equation*}
\begin{equation*}
    C_1\subseteq f^{-1}\circ f(C_1)\subset f^{-1}(B_1), C_2\subseteq f^{-1}\circ f(C_2)\subset f^{-1}(B_2)
\end{equation*}
\begin{equation*}
    \Downarrow 
\end{equation*}
\begin{equation*}
    C_1\cap C_2\subset f^{-1}(B_1)\cap f^{-1}(B_2)=f^{-1}(B_1\cap B_2)
\end{equation*}
Then I get stuck here. Any hint for proving the second property of basis?
Edit: As pointed out in the comments, this is actually a question about proving whetever or not the family $\{S(C, B) : C\text{ compact}, B\in\mathcal{B}\}$ is a subbasis for $\mathcal{C}(X, Y)$.
 A: Unfortunately your approach is inadequate. Even if you would succeed to prove the second property, this does not prove that $\mathcal B^∗=\{S(C,B)∣C⊂X \text{ compact },B∈\mathcal B\}$ is a basis for the compact-open topology. It only proves that you get a basis for some topology on $\mathcal C(X,Y)$. See for example here or consult a textbook on general topology.
Let us first see that $\mathcal B^∗$ is normally not a basis for the compact-open topology. Note that if $\mathcal B^∗$  is basis, then all the more $\mathcal O^∗=\{S(C,U)∣C⊂X \text{ compact },U \subset Y \text{ open}\}$ must be a basis for the compact-open topology.
Consider any two spaces $X,Y$ such that there exists a continuous map $f : X \to Y$, two distinct points $x_1,x_2 \in X$ and two disjoint open subsets $U_1, U_2 \subset Y$ such that $f(x_i) \in U_i$. As an example you may take any Hausdorff $X$  with more than one point and $Y = X$. Then $f = id$ has this property.
Let $S_i = S(\{x_i\}, U_i)$. Then $M = S_1 \cap S_2$ is open in $\mathcal C(X,Y)$. By construction $g \in M$ iff $g(x_i) \in U_i$. In particular $f  \in M$. Note that $M \ne  \mathcal C(X,Y)$ because no constant function is contained in $M$.
If $\mathcal O^∗$ were a basis for the compact-open topology, then we would find a compact $C \subset X$ and an open $U \subset Y$ such that $f \in S(C,U) \subset M$. We shall show that this leads to a contradiction. Note that $C = \emptyset$ is impossible since then $S(C,U) = \mathcal C(X,Y)$ which contradicts $M \ne \mathcal C(X,Y)$. Thus also $U \ne \emptyset$ because $f(C) \subset U$. Pick any $y \in U$ and let $g : X \to Y$ be the constant map with value $y$. Then $g \in S(C,U)$, but it is impossible that $g(x_i) \in U_i$ for both $i$.
As you write in a comment, we are only supposed to show that $\mathcal B^∗$ is a subbasis for the compact-open topology. This is true more generally true if $\mathcal B$ is a subbasis of $Y$, but the proof is technically a bit more complicated. One can also omit the assumption that $X$ is locally compact, but let us assume that $X$ is Hausdorff to avoid the discussion whether the compact-open topology is defined via the sets $S(C,U)$ with compact $C$ or with compact Hausdorff $C$.
So let $\mathcal B$ be a basis of $Y$ and $X$ be Hausdorff.
It suffices to prove that each set $S(C,U)$ with compact $C \subset X$ and open $U \subset Y$ is the union of sets of form $\bigcap_{i=1}^n S(C_i, B_i)$ with $B_i \in \mathcal B$. This shows that the topology generated by $\mathcal B^*$ contains the standard subbasis of the compact-open topology, and thus agrees with the compact-open topology.
Let $f \in S(C,U)$. For each $x \in C$ we have $f(x) \in U$ and can pick $B_x \in  \mathcal B$ such that $f(x) \in B_x \subset U$. The $f^{-1}(B_x)$ cover $C$, thus there are finitely many $x_i \in C$ such that $C \subset \bigcup_{i=1}^n f^{-1}(B_i)$, where $B_i = B_{x_i}$. Since $C$ is compact Hausdorff, we find compact $C_i \subset C$ such that $C_i \subset f^{-1}(B_i)$ and $\bigcup_{i=1}^n = C$. By construction $f  \in \bigcap_{i=1}^n S(C_i, B_i)$. Now let $g \in \bigcap_{i=1}^n S(C_i, B_i)$. Then $g(C_i) \subset B_i$ for all $i$, thus $g(C) = g(\bigcap_{i=1}^n C_i) = \bigcap_{i=1}^n g(C_i) \subset  \bigcap_{i=1}^n B_i \subset U$, i.e. $g \in S(C,U)$. This proves $f \in  \bigcap_{i=1}^n S(C_i, B_i) \subset S(C,U)$.
