The group $$G\cong H\times K$$ with $$H\cong \langle S_H\mid R_H\rangle$$ and $$K\cong \langle S_K\mid R_K\rangle$$ has as a presentation $$G\cong \langle S_H\cup S_K\mid R_H\cup R_K\cup X\rangle,$$ where $$X=\{hk=kh\mid h\in S_H\text{ and } k\in S_K\}$$, from which it is easy to see that $$H\cong L$$ such that $$L\unlhd G$$. (Why?)