If I understand correctly, Dham wants to solve for x in the equation:

MOD(295+x,300)=1.

In other words, what has to be added to 295 to get 1 if we are resetting to zero when it reaches 300.

MOD(295+6, 300)=1 makes sense for the example given.

This however, is not solvable without more information. If you know that 300 was only reached once before resetting to 0, then the formula would be
C1=B1+300-A1.