I know how to solve double integrals in general, but this one is a bit tricky.
Draw the curve y = x^2 inside the square. This divides the square into two regions. In the upper region, y > x^2 so max(x^2, y) = y. In the lower region, y < x^2 so max(x^2, y) = x^2. So your integral becomes: