Solving equations with fractions and variables