The rules of fractions are no different for expressions that involve variables than they are for expressions involving only constants. Many students make errors when combining and simplifying fractions, sometimes because they are so used to working with equations that they have forgotten that some steps only work with equations.
If you wish to simplify a fraction, you may only do so if the term to be cancelled is a factor of both the numerator and the denominator.
The answer shown below is wrong. Try working your way through the problem backwards, from the answer up. As you find each mistake, try to identify the thinking behind it… what perspective led to the mistake? What should have been done instead?
Hint 1: The correct answer to the problem on the first line is
Hint 2: The same type of error is made twice in the work above, but even if it were a valid approach to simplifying this expression, another type of error was also made.