How can I prove that central product of $\displaystyle D_{8}$ by $\displaystyle D_{8}$ is isomorphic to central product of $\displaystyle Q_{8}$ by$\displaystyle Q_{8}$, i.e. $\displaystyle D_{8}\circ D_{8} \cong Q_{8}\circ Q_{8}$.

(If G is a group and H,k be its subgroups, then G is central product of H by K if we have: 1)G=HK. 2)hk=kh for all h in H and all k in K, then we write G=$\displaystyle H \circ K$.

Hint: We have $\displaystyle H \circ K \cong (H \times K)/D$ where $\displaystyle D=kerf $ and $\displaystyle f:H \times K \rightarrow H \circ K$ is a homomorphism for which we have $\displaystyle f(h,k)=hk$. Then $\displaystyle D=kerf=\{(h,h^{-1})|h \in H \cap K\}$. )