Continuity of cartesian product of functions between topological spaces
Hint: There is an easier way, if $\pi_i:X_1 \times X_2 \rightarrow X_i $ and $p_i:X'_1 \times X'_2 \rightarrow X'_i $ are the projections and $f_i: X_i \rightarrow X'_i$ are continuous for $i=1,2$, then simply show that $p'_i\circ (f\times g) = f_i \circ \pi_i$ which is continuous by assumption.