I apologize if this question is elementary: Let $A$, $B$, and $A^{\prime}$ be groups such that $A^{\prime}$ is an elementary extension of $A$. Is it true that $A^{\prime}\times B$ is an elementary extension of $A\times B$? Clearly this is true for ultrapowers. 



Elementary extensions of direct product
Yes. Let $T$ be the theory of two disjoint groups, in the language $(\cdot\_1, \cdot\_2, U\_1, U\_2)$. Note that if $(G\_1, G\_2) \models T$ then the group operation on $G\_1 \times G\_2$ is definable without parameters. Thus we can recover the theory of $G\_1 \times G\_2$ from the theory of $(G\_1, G\_2)$, which is clearly determined by $(\mbox{Th}(G\_1), \mbox{Th}(G\_2))$. Thus if $G\_1, G\_2, G\_1', G\_2'$ are any groups with each $G\_i \equiv G\_i'$, then $G\_1 \times G\_2 \equiv G\_1' \times G\_2'$.


EDIT: this just shows elementary equivalence. In order to get elementary extensions: let $G\_1, G\_2$ be given groups, and consider the language $(\cdot\_1, \cdot\_2, U\_1, U\_2,c\_g: g\in G\_1, d\_h: h \in G\_2)$ where we add constant symbols for elements of $G\_1$ and $G\_2$. Let $T\_\*$ assert that $T$ holds, and the elementary diagram of $G\_1$ holds in $U\_1$, and the elementary diagram of $G\_2$ holds in $U\_2$. Note that $T\_\*$ is actually complete. Now let $(G\_1', G\_2', g, h)\_{g \in G\_1, h \in G\_2} \models T\_\*$. Then the group operation on $G\_1' \times G\_2'$ is definable without parameters, and further every element of $G\_1 \times G\_2$ is definable without parameters. Thus $(G\_1 \times G\_2, (g, h))\_{g \in G\_1, h \in G\_2} \equiv (G\_1' \times G\_2', (g, h))\_{g \in G\_1, h \in G\_2}$, since each sentence must be decided by $T\_\*$; this is the same as saying $G\_1 \times G\_2 \preceq G\_1' \times G\_2'$.


