The quickest way to do this is by geometry. The question is asking about the point in the plane x+y+z=3a^2 that is closest to the origin. More precisely, you want the square of this minimum distance. It's easy enough to see that the minimum occurs when x=y=z=a^2. So the minimum value of x^2+y^2+z^2 is 3a^4.