Solving equations with variables on one side