If $f(z)=(g(z),h(z))$ is continuous then $g$ and $h$ are as well 
If $f(z) = (g(z),h(z))$ is continuous then $g$ and $h$ are as well.

The converse is easy for me to prove, but I'm not seeing how to prove it using the terminology of open sets and not metric spaces.
 A: So, $g\colon X\to Y$ and $h\colon X\to Z$ are maps, and you let $f\colon X\to Y\times Z$, endowing $Y\times Z$ with the product topology. You know $f$ is continuous, and you want to show that $g$ and $h$ are continuous.
The simplest way does not use open sets at all: it just notes that the projections $\pi_Y\colon Y\times Z\to Y$ and $\pi_Z\colon Y\times Z\to Z$ are continuous, and composition of continuous functions is continuous. What is $\pi_Y\circ f$ and what is $\pi_Z\circ g$?
If you absolutely, definitely, positively must use open sets, note that if $A\subseteq Y$ and $B\subseteq Z$, then
\begin{align*}
x\in f^{-1}(A\times B) &\Longleftrightarrow g(x)\in A\text{ and }h(x)\in B\\
&\Longleftrightarrow x\in g^{-1}(A)\text{ and }x\in h^{-1}(B)\\
&\Longleftrightarrow x\in g^{-1}(A)\cap h^{-1}(B).
\end{align*}
So, let $\mathcal{U}\subset Y$ be an open subset of $Y$. We know that $\mathcal{U}\times Z$ is open, sos= $f^{-1}(\mathcal{U}\times Z)$ is open. What is it?
And let $\mathcal{O}\subseteq Z$ be an open subset of $Z$; then $Y\times\mathcal{O}$ is open, so $f^{-1}(Y\times\mathcal{O})$ is open. What is it?
A: Compose $f$ with a projection. (First prove that a projection is continuous.)
