Solving equations with word problems