You know how to increase d by one. Use f for e.
That is simply subtracting 2d +1 from e.
As d increased by one the remainder became negative because it's larger than c now.
A and b stayed the same.
X also goes up by 1 and n is reduced by 1. You can do this over and over. Remainder keeps getting more negative as d is increasingly larger than c. Each increase in d makes the remainder 2d+1 smaller than the previous d.
The formula allows you to move multiple Ds. When you have done that n times then e = -(x+n)^2
Then n=0 and x= x+n and that is the solution.