Given $(X,\mathcal{F}),(Y,\mathcal{F}')$ two topological spaces, we define for $X \times Y$ the topology product as $$\mathcal{F}_{prod} := \{\cup_{k \in K}(U_k \times V_k) : U_k \in \mathcal{F}, V_k \in \mathcal{F}'\}.$$
How we can prove that verify the second condition of a topology (that is, the union of elements also belongs to $\mathcal{F}_{prod}$)?
We get $\cup_i (\cup_{k_i} (U_{k_i} \times V_{k_i})) = \cup_{k_i} (\cup_i (U_{k_i} \times V_{k_i})) = ...$?
A union of unions of open boxes is again a union of open boxes.
That’s the whole essence as to unions. If you want formula: Suppose we have $O_i = \bigcup_{j \in K_i} (U_j \times V_j)$, where for each $i$ we have an index set $K_i$ that we take the union of open boxes over (we can always ensure that these index sets are pairwise disjoint for convenience, which we'll assume), then:
$$ \bigcup_{i \in I} O_i = \bigcup_i \left(\bigcup_{j \in K_i} (U_j \times V_j)\right) = \bigcup_{j \in \bigcup_{i\in I} K_i} (U_j \times V_j)$$
For finite intersections observe that $$\left(\bigcup_{i\in I} (U_i \times V_i)\right) \cap \left( \bigcup_{j \in J} (U_j \times V_j) \right)= \bigcup_{(i,j) \in I \times J} (U_i \cap U_j) \times (V_i \cap V_j) $$
which is again of the same form.