You are getting confused with constant and variables ( ). They cannot cancel each other out. Constants can only cancel out constants and variables can only cancel variables. Let me explain the procedure:

You correctly said to flip a fraction and multiply, hence:

Simplify the expressions. can be simplied to as the denominator has and rules of indices says so we have (Notice, we only let constants work with constant and variables work with variable ). For , the numerator and the denominator can be factorised to get . We have on the numerator and the denominator so we can cancel it out to get So we get:

For fractions, when we have to multiply, we multiply the numerator (top) together and we multiply the denominator (bottom) togather. So we get: