When you are multiplying 2 numbers with exponents, you need to add the exponent. When you multiply an exponent with an exponent, you multiply them.
So,
(3^2 x 7^4) ^9
First multiply the base and add exponents = ( 21^6) ^9
= 21 ^6x9
21^54
The same rule applies for variables, just pretend there is an imaginary 1.