An answer to question Isomorphism of Direct Product of Groups says if you have two (or more) group isomorphisms $ \phi_1:A_1 \rightarrow X_1 $ and $ \phi_2:A_2 \rightarrow X_2 $ then it follows that $ A_1 \times A_2 \cong X_1 \times X_2 $ under the isomorphism $\phi(a_1,a_2)=(\phi_1(a_1),\phi_2 (a_2) )$
I am interested in whether the converse of this statement is true.
If $\phi: A_1 \times A_2 \rightarrow X_1 \times X_2 $ is an isomorphism, is it true that $A_1 \cong X_1 $ under an isomorphism $ \phi_1 $ and $ A_2 \cong X_2 $ under an isomorphism $\phi_2$ such that $ \phi(a_1,a_2)= (\phi_1 (a_1), \phi (a_2)) $?
No, and this is always false for any group that can be written as a direct product in a non-trivial way. For example, if $G = A \times B$ with neither $A$ nor $B$ the trivial group, then
$$A \times B = G \equiv G \times \{e\}$$