How come I have to put p^3 on the numerator but not the denominator? If the exponent is positive is goes on top always, if not then bring it down and make it positive?

If the problem had a p^-3 instead, why would it become 1/p^3 ? I know the 3 would go to the bottom and become positive, however I don't know how you got 1 over it.