Show that in the compact-open topology, $C(X, Y)$ is Hausdorff if $Y$ is Hausdorff and regular if $Y$ is regular
In the first statement, let $f,g$ be 2 functions in $C(X,Y)$, we need to find 2 disjoint subbasis elements $S(C_{1}, U_{1}), S(C_{2}, U_{2})$ that contains $f,g$. I think we can choose $C_{1} = C_{2}$, and then choose 2 disjoint open sets $U_{1}, U_{2}$, then $S(C_{1}, U_{1})$ and $S(C_{2}, U_{2})$ are disjoint. But how can we choose $C$ ?
In my book, there's a hint: If $\bar{U} \subset V$, then $\overline{S(C,U)} \subset S(C,V)$, but I even can't prove this hint, cause I don't know how to express an element of $\overline{S(C,U)}$.
Can someone help me clarify all these problems? Thanks