Two squares, each with side length $5 \mathrm{~cm}$, overlap as shown. The shape of their overlap is a square, which has an area of $4 \mathrm{~cm}^{2}$. What is the perimeter, in centimetres, of the shaded figure?
(A) 24
(B) 32
(C) 40
(D) 42
(E) 50

![](https://cdn.mathpix.com/cropped/2024_04_20_46ead6524a8d61e21c51g-085.jpg?height=290&width=336&top_left_y=2235&top_left_x=1361)
Solution 1

We can calculate the perimeter of the shaded figure by adding the perimeters of the two large squares and subtracting the perimeter of the small square. This is because all of the edges of the two larger squares are included in the perimeter of the shaded figure except for the sides of the smaller square. Since the side length of the larger squares is $5 \mathrm{~cm}$, the perimeter of each of the two larger squares is $20 \mathrm{~cm}$.

Since the area of the smaller square is $4 \mathrm{~cm}^{2}$, then its side length is $2 \mathrm{~cm}$, and so its perimeter is $8 \mathrm{~cm}$. Therefore, the perimeter of the shaded figure is $20+20-8=32 \mathrm{~cm}$.

## Solution 2

We label the vertices in the diagram and calculate directly.

We know that the two large squares each have a side length of 5 $\mathrm{cm}$, so $A B=A D=Y X=Y Z=5$.

The smaller square has an area of $4 \mathrm{~cm}^{2}$, and so has a side length of $2 \mathrm{~cm}$. Therefore, $W M=M C=C N=N W=2$, and so each of $B M, D N, M X$, and $N Z$ have a length of $3 \mathrm{~cm}$ (the difference between the side length of the two squares).

![](https://cdn.mathpix.com/cropped/2024_04_20_748fdafcde2a47412608g-367.jpg?height=360&width=331&top_left_y=777&top_left_x=1409)

Thus, the total perimeter of the shaded figure is $4 \times 5+4 \times 3=32 \mathrm{~cm}$.

ANswer: (B)