As Simon says in the comments, it is sufficient that the product preserves pushouts in each variable, which is the case in Set and in any cartesian closed category of spaces. (Indeed, the product can be replaced by any two-variable functor that preserves pushouts in each variable.)
Unfortunately at the moment I can't find a good reference that says exactly this, although I would be more surprised than not if it doesn't exist somewhere in the literature. Simon sketched one proof method in the comments; here's a slightly more abstract one that is at least closer to some things in the literature.
First notice that the goal is equivalent to saying that the pushout product functor $\hat{\times} : \mathcal{C}^{\mathbf{2}} \times\mathcal{C}^{\mathbf{2}} \to \mathcal{C}^{\mathbf{2}} $ takes a pair of pushout squares (regarded as morphisms in the arrow category $\mathcal{C}^{\mathbf{2}} $) to a pushout square. Since pushout squares are closed under composition (again, as morphisms in $\mathcal{C}^{\mathbf{2}} $), it suffices to show that $\hat{\times}$ preserves pushout squares in each variable separately. Thus, we can reduce to the case where we have a pushout $D$ of $C\leftarrow A \to B$ and a morphism $W\to X$, and we want to show that $D\times X$ is the pushout of
$$ (C\times X) \cup_{C\times W} (D\times W) \leftarrow (A\times X) \cup_{A\times W} B\times W \to B\times X $$
Now there is a commutative cube in which the top and bottom faces are the images of our given pushout square $D = C\cup_A B$ under the functors $(-)\times W$ and $(-)\times X$, while the vertical arrows are induced by the map $W\to X$. I trust you can draw this cube; let's orient it so that $A$ and $B$ appear on the back face and $C$ and $D$ appear on the front face.
The back and front faces of this cube are not pushouts. But if we take the pushouts of their underlying spans, the induced maps from these pushouts to the lower-right corners are the two pushout-product maps in question, and the induced square between them is the one we're interested in. A diagram of this sort of "pushouts in two faces of a cube" can be found, for instance, at the top of page 9 of this paper; it's not there in the situation of a pushout product, but the immediate goal is the same, namely to show that the relevant square is a pushout. This follows by repeated application of the pushout pasting lemma (in both directions) to the four squares that are known to be pushouts.