I still don't have a clear approach, but this is what I see.
$m \mid b$ and $m \mid a$ or $m\nmid b$ and $m\nmid a$.
I may think that the way is showing $\gcd(a,m)\leq\gcd(b,m)$ and $\gcd(a,m)\geq\gcd(b,m)$
I still don't have a clear approach, but this is what I see.
$m \mid b$ and $m \mid a$ or $m\nmid b$ and $m\nmid a$.
I may think that the way is showing $\gcd(a,m)\leq\gcd(b,m)$ and $\gcd(a,m)\geq\gcd(b,m)$
Note that if $d = gcd(a,m)\to d\mid a, d\mid m\to d\mid (a-b)\to d\mid ((b-a)+a) = b$.Thus $d \mid gcd(b,m)$.Similarly $gcd(b,m) \mid gcd(a,m)$.Thus they are equal.
Hint: using Bézout's identity $ka+tm = gcd(a,m)$ (1)
using $a\equiv b\pmod m$, $a = cm+b$
substitute into (1), $k(cm+b)+tb = (kc+t)m+tb = gcd(a,m)$
By this post: $gcd(b,m) | gcd(a,m) $
In a same way, $gcd(a,m) | gcd(b,m)$
=>$gcd(a,m) = gcd(b,m)$