Solve for x S=2(ab+ax+bx)