Your method is mathematically correct so it wasn't just luck that you got it right.
You would have found it easier (smaller numbers, less arithmetic) if you had cancelled down fractions at every possible opportunity. For example (8 a^3 b^4 / 4 a^2 b^6) ^3 cancels to (2a/b²)³.