Everything I've read about modular arithmetic generally concerns doing things in some "mod m" world where "m" is some constant. But I'm perplexed how to tackle modular arithmetic problems where the aim is to find the modulus which produces some result.
More specifically: "Given positive integers $a,b,c$, how can I go about efficiently finding $x$ such that $ax \equiv 1 \pmod{bx+c}$?"
For example, with $a=2021$, $b=89$, $c=1932$, I'm looking for $x$ such that $2021x \equiv 1 \pmod{89x+1932}$. By brute force search, I happen to know that this is solved by $x=83$, but surely there's a better way...
For what it's worth, in the problems I'm concerned with $c=a-b$ (as hinted by the example numbers given above), but I'm not sure how useful that is if there's a more general technique anyway.