If the index is the same, how to calculate the base

If the index is the same, how to calculate the base

For example, a ^ n * B ^ n
The index is the same, the base is multiplied
a^n*b^n
=(ab)^n