Suppose $A_i$ is a compact subset of a topological space $X_i$ for all $i\in I$.
Tychonoff’s theorem says the product of compact spaces is compact. Since $A_i\subseteq X_i$ is compact, this means $A_i$ is compact as a subspace of $X_i$ and thus the product space $\prod A_i$ (with product topology) is compact.
However, I’m not sure if what I have shown is enough to say $\prod A_i$ is a compact subset of $\prod X_i$ (with product topology). Is there a better way to show this?