For this case we must find the area of the octagon and subtract the area from the square, in order to obtain the area of the shaded region.

So:

Where:
P: It is the perimeter
a: It is the apothem
We have to:

Substituting:

On the other hand:

Finally:

Answer:
Option A