This is because (w^5)^-7 expands to give w^-35 because you multiply the exponents. When you have a negative exponent, this can also be written as a reciprocal, i.e. x^-2 = 1/x². This means that we can write w^-35 as 1/(w^35), which doesn't include any negative exponents.
I hope this helps! Let me know if you have any questions :)