Solve for a a^2b-c=d