Say $X$, $Y_1$ and $Y_2$ are topological spaces. Let $f_1 \; X \to Y_1$ and $f_2 \; X \to Y_2$.
If $f\; X \to Y_1 \times Y_2 $ $f(x) = (f_1(x), f_2(x))$
$Y_1 \times Y_2$ is a topological space with the product topology.
How do I prove that $f$ is continuous in $x$ if and only if $f_1$ and $f_2$ are continuous in $x$ ?
That is almost the definition of the product topology (i. e. the product is defined such that the above holds).
Hints: (1) If $f$ is continuous, note that the projections $\pi_i \colon Y_1\times Y_2 \to Y_i$ are continuous.
(2) If the $f_i$ are continuous, note that the sets $U_1 \times U_2$, where $U_i\subseteq Y_i$ are open, form a base of the product topology. What is $f^{-1}[U_1 \times U_2]$?