Suppose $G_1=\langle X_1|R_1\rangle$, $G_2=\langle X_2|R_2\rangle$, $X_1\cap X_2=\emptyset$. I want to show that $G_1\times G_2=\langle X_1\cup X_2|R_1\cup R_2\cup[X_1,X_2] \rangle$.
By using universal property of free groups, I have obtained homomorphisms $f_i:F(X_i)\rightarrow F(X_1 \cup X_2)$. Also I can define homomorphisms $\pi_i:F(X_i) \rightarrow G_i$ such that $\ker(\pi_i)= R_i^{F(X_i)}=$ normal closure of $R_i$.
I want to define a group $G = \langle X_1\cup X_2|R\rangle$ with $R$ satisfying the conditions of direct product, and somehow $R$ contains $[X_1,X_2]$. But I'm kind of stuck here.