m^9p^16/ m^3p^12

you have something equivalent to

m^9/m^3 * p^16/p^12

Now use the properties of exponents to cancel the common factors.