Solve for a g=b(a+D^2)