Given $x$ and $y$, let $m=ax+by$ and $n=cx+dy$, where $ad-bc=\pm1$. Prove that $(m,n)=(x,y)$.
First attempt Given that $(x,y)\mid m$ and $(x,y)\mid n$ so $(x,y)\mid (m,n)$. Furthermore, from the initial relations one can find that $$ x=\frac{dm-bn}{ad-bc}=\pm(dm-bn),\quad y=\frac{an-cm}{ad-bc}=\pm(an-cm) $$ but so $(m,n)\mid(x,y)$ by the same reasoning. Being the gcd always positive one may conclude that $(man)=(x,y)$.
Second Try If, $g=(m,n)=(ax+by,cx+dy)$, then there are $\alpha,\beta$ such that $$ (ax+by)\alpha+(cx+dy)\beta=g $$ and rewriting one find that $$ x(a\alpha+c\beta)+y(b\alpha+d\beta)=(x,y)=g. $$
I feel the first is better.