Let $A$ be a group with a subgroup $B$, we define the double of $A$ along $B$ as the free amalgamated product of two copies of $A$ along $B$, i.e., if $$ A=\langle S \mid R\rangle $$ and we use subindices to distinguish between each copy of $A$, then $$ D(A,B)=A\ast_B A=\langle S_1\sqcup S_2 \mid R_1\sqcup R_2\sqcup b_1=b_2\forall b\in B \rangle. $$
On the other hand, if $\beta:B\to B$ is an automorphism of $B$, we define the twisted double of $A$ along $B$ by means of $\beta$ as the free amalgamated product of two copies of $A$ but in which one of the copies the inclusion $B\hookrightarrow A$ is composed with $\beta$:
$$ D(A,B,\beta)=\langle S_1\sqcup S_2 \mid R_1\sqcup R_2\sqcup b_1=\beta(b_2)\forall b\in B \rangle. $$
Now my question is, do these two constructions yield isomorphic groups? It seems to me that we are just changing names, so the groups should be equivalent. However the fact that the twisted definition exists makes me think they are not equivalent at all.
We can travel between the Algebraic world and the Topological world via Seifert-Van Kampen's theorem– which is a trip I really like to do. From this point of view, the question is: given a topological space $X$ with an open subspace $U$ such that the inclusion $U\hookrightarrow X$ is $\pi_1$-injective, and a homeomorphism $\varphi:U\to U$, consider the spaces obtained by gluing two copies of $X$ along $U$, one via identity and the other via $\varphi$. Do we obtain isomorphic fundamental groups?
I would very much appreciate it if someone can provide either a counterexample or a hint on why this is true.
Thank you in advance.
In the example I described in my comment with $A = \langle a,b \rangle \cong C_4 \times C_2$ and $B = \langle x,y \rangle$, the untwisted group has presentation $$\langle a,b,x,y \mid x^2=y^2=[x,y]=1,a^2=b^2=x,[a,y]=[b,y]=1 \rangle,$$ and the twisted group has presentation $$\langle a,b,x,y \mid x^2=y^2=[x,y]=1,a^2=x, b^2=y,[a,y]=[b,x]=1 \rangle.$$ The abelianizations of thes two groups have invariants $(2,2,4)$ and $(4,4)$, respectively, so they are not isomorphic.