Hey guys, for the following question how do I solve for x?

(2^3)^x = 2^6

I know that to raise a power to a power I need to multiply the exponents. In the above question I thought that maybe I can solve it by dividing the exponents, but my math book doesn't mention anything about dividing exponents.

here's how I tried to solve it:

(2^3)^x = 2^6

(2^3)^x = (2^3)^2

x = 2

I assumed that since both have the same bases, I can equate x to 2.