Solving equations with subtraction and multiplication