Solve for x ax+b=cx+d