This question gives one info which is $a\cong b \pmod m$ then we have to conclude that $(a,m)=(b,m)$. Here is what I have so far
$a \cong b \pmod m$ so $a-b=mj$ so $a=mj+b$ , $b=a-mj$
also let $(a,m)=d_1$ and $(b,m)=d_2$ so $ax+my=d_1c$ and $au+mv=d_2k$
I did some algebra and got $$m(jx+y-uj)+bx+au=d_2k+d_1c$$ I am stuck here.... Any hints will be greatly useful