a3 b2 = a × a × a × b × b
A perfect cube is a result of multiplying a number three times by itself, or, in other words, it is an integer to the exponent 3.
a3 b2 can be a perfect cube if 'b' is a perfect cube in the first place. But since it is given 'a' and 'b' are prime numbers, b can not be a perfect cube.
As b has only two as exponent on itself, if we multiply a3 b2 with one more 'b' it becomes a perfect cube.