Let $a,b,x \in \mathbb{N}$ and $u,v\in\mathbb{Z}$ so that $x=ua+vb$. If $x\mid a$ and $x\mid b$ then $x=\gcd(a,b)$.
My idea was to perform a proof by contradiction. Assume $x$ is not the $\gcd$, then let $y=\gcd(a,b)$ and clearly since $x$ still divides $a$ and $b$, $y>x$. Then writing $y$ as $y=sa+tb=skx+tlx=x(sk+tl)>x$ but I can't seem to find a contradiction from this point on. MaybeI should do this proof in another way.
Any help would be appreciated!