We can set up an equation for a problem like this:
$x$ is the number of children the first aunt has and $y$ is the number of children the second aunt has. Then the first aunt made $x^2$ sweets and the second $y^2.$ Their total is $x^2+y^2.$
Since the total is the cube of $y,$ we can say $x^2+y^2 = y^3.$
Then do some simplification:
Subtract $y^2$ from both sides to get $x^2 = y^3-y^2.$ Now factor out $y^2$ from the right to get $x^2 = y^2(y-1).$
So what does this tell us?
Well, the left side is a perfect square, so the right side must also be a perfect square. Since $y^2$ is already a perfect square, we must have $y-1$ also be a perfect square. Given the limitation of having $30$ people, this tells us that $y-1$ equals either $1,$ $4,$ $9,$ $16,$ or $25.$ So $y$ equals one of $2,5,10,17,26.$
But...
We also must have $x+y \le 30.$ With a little testing, we can see that $y=2$ works as $y^2(y-1) = 2^2 = 4$ so $x=2$ also. $y=5$ also works, as $y^2(y-1) = 25\cdot 4 = 100$ which means $x=10.$ But $y=10$ won't work since $y^2(y-1) = 100\cdot9 = 900.$ This means that $x=30$ but then we'd have more than 30 people at the reunion.
So either....
They both have $2$ kids or aunt 1 has $10$ kids and aunt 2 has $5$ kids. To check both:
$2^2+2^2=8$ which is equal to $2^3$ and $10^2 +5^2 = 125$ which is equal to $5^3.$ Given that the first aunt is better at cooking, I'm going to say that the first aunt has $10$ kids and the second $5.$