Yes, with X+5 instead of X-5, JJs method works fine (X+5 = 616, so X = 611). It depends on the fact that the divisor minus the remainder is the same for all 3 cases. As long as that's the case, it's general, e.g. try it with:
x/9 -> remainder 3,
x/8 -> remainder 2,
x/7 -> remainder 1,
9*8*7 - 6 = 504 - 6 = 498, which works.