Over 3 years after asking the question I found the solution. I have included it as an answer.
I have an expression with modulus in it that needs to
The tricky part about this equation is that even if you know a, m, and b, you can not conclusively figure out x.
For example, say your equation was:
(2 + x) % 4 = 3
x could be 1, 5, 9, 13 etc.
This means you are out of luck, there is no way to get x by itself.