If $(ai+x)\mod m = b $ then how can we prove that $x = (b-a)\mod m$?
If it is not correct then what is correct value for $x$?
If $(ai+x)\mod m = b $ then how can we prove that $x = (b-a)\mod m$?
If it is not correct then what is correct value for $x$?
Just use Definitions.
$A\equiv B\pmod m$ means $m|A-B$ means there exists an integer $k$ so that $mk = A- B$ means there exists an integer so that $A = B + mk$.
So if $ai+x \equiv b \pmod m$ then there exists a $k$ so that $ai+x = b + mk$, but then there exists an integer $k$ so that $x=b - ai + mk$. So $x\equiv b-ai\pmod m$.