Solving inequalities with variables and constants