If the diameter is 2, one side of the square has a length of 4 (basically two diameters).
Then, the equation for the shaded area is Area(square) - 4*Area(circle)
=(length*width)-4(2pi*radius)
=(4)(4)-4(2pi)(1)
=16-8pi
(FYI that the radius is 1 because it’s just half of the diameter.)