According to answers to this Math Overflow question, there is an infinite rank abelian group $A$ such that $A\cong A^3$ but $A\not\cong A^2.$ Clearly $A$ is an retract of $A^2$ while $A^2$ is an retract of $A^3\cong A$. Therefore, $A$ and $A^2$ are non-isomorphic groups which are retracts of each other.
Are there two finitely presented groups $G$ and $H$, such that $G\not \cong H$ which are retracts of each other?
Thank you in advance.