first if all we have to simplify the whole number and see if it has he same basis of the powered number or not.
If so like 8 it has the same base for

as they are both can be obtained by multiplying a certain number of 2s.
for example

which makes 8 can be obtained by multiplying three 2s.
in our example

in this case, we can add the two powers as long as the basis are the same.

I hope it make sense now ;)
Best Wishes