The two areas are equal because the four quarter circles in the first figure have the same radius as the circle. The area of the shaded region in the first figure is the area of the square without the four quarter circles (marked as 1,2,3 and 4), and the area of the shaded region in the second figure is the area of the square without the circle. Also, the radii of the quarter circles 1,2,3 and 4 are equal.
Area of 1 quarter circle =π×r24
Area of 4 quarter circles = 4×πr24 =πr2, which is equal to the area of circle.