Give example of two non-isomorphic groups that have same as sets. Does there exists two non-isomorphic groups with the following properties:
1.Two groups are same as sets.
2.Two groups have the same identity element.
3.Each element has same inverse in each of the groups.
I have done an exercise on isomorphism chapter of J.Gallian's book where all the criteria are fulfilled but they are isomorphic.But is there a non-isomorphic example?
 A: Suppose $G$ and $H$ are any two groups of the same size, which have the same number of elements of order $2$. Suppose we write $G=\{e_{\small G}\}\sqcup X\sqcup A\sqcup A'$ and $H=\{e_{\small H}\}\sqcup Y\sqcup B\sqcup B'$, where $X,Y$ are the elements of order $2$ and $A\sqcup A',B\sqcup B' $ are partitions of the other nontrivial elements of $G,H$ such that no two elements in just one of the sets are mutually inverse.
(So, for instance, if $a\in A$ then $a^{-1}\in A'$.)
Any pair of bijections $X\to Y,A\to B$ extends to a bijection $f:G\to H$ by stipulating the conditions and $f(e_{\small G})=e_{\small H}$ and $f(a^{-1})=f(a)^{-1}$ for all $a\in A$. Then $f$ may be used for transport of structure to make $H$ have two group operations with the same inverses.

The smallest example of when two nonisomorphic groups have the same order and the same number of elements of order $2$ are the cyclic group $\mathbb{Z}_8$ and the quaternion group $Q_8$.  In this case, we can biject $\{\pm1,\pm i,\pm j,\pm k\}$ with $\{\bar{0},\bar{1},\cdots,\bar{7}\}$ as follows:
$$ \begin{array}{|c|c|} \hline \mathbb{Z}_8 & Q_8 \\ \hline \bar{0} & 1 \\ \hline \bar{1} & i \\ \hline \bar{2} & j \\ \hline \bar{3} & k \\ \hline \bar{4} & -1 \\ \hline \bar{5} & -k \\ \hline \bar{6} & -j \\ \hline \bar{7} & -i \\ \hline  \end{array}$$
This allows us to turn $Q_8$ into a cyclic group with respect to a different operation $\bullet$, by stipulating $1$ is still the identity with respect to $\bullet$, the element $i$ is a cyclic generator, its first powers are $i\bullet i=j$ and $i\bullet i\bullet i=k$, and all elements' inverses are given by $-x$ (so that $-x\bullet x=1$).

There are two ideas in this answer. The first is that transport of structure tells us two operations on the same set is equivalent to a bijection between two sets with operations. The second is that the bijection we need must be an isomorphism of pointed $\mathbb{Z}_2$-sets, where any group $G$ is a pointed set because the identity is a distinguished element and is a $\mathbb{Z}_2$-set because $\mathbb{Z}_2$ acts on $G$'s underlying set by inverses ($g\leftrightarrow g^{-1}$).
