The problem (x5y2) / (yx)2 can be written as: (x·x·x·x·x·y·y) / (y·y·x·x)
and can be simplified by cancelling out the same factors in the numerator and denominator to end with: x3.
(Or, since you are dividing, subtract the exponents from the same factors.)