# Solution to the Two Squares and a Rectangle in an Octagon Puzzle +-- {.image} [[TwoSquaresandaRectangleinanOctagon.png:pic]] > Inside this regular octagon sit two squares of area $8$. What's the area of the shaded rectangle? =-- ## Solution by [[Lengths in a Square]] or [[Pythagoras' Theorem]] +-- {.image} [[TwoSquaresandaRectangleinanOctagonLabelled.png:pic]] =-- As the area of the squares is $8$, the side length is $2 \sqrt{2}$. Triangle $H G B$ is an [[isosceles]] [[right-angled triangle]] so is half a square. Therefore, either by using [[Pythagoras' theorem]] or from [[lengths in a square]], the length of $H G$ is $\frac{2 \sqrt{2}}{\sqrt{2}} = 2$. The length of $E H$ is then $4 + 2 \sqrt{2}$. This is also the length of $B J$, so the length of $C I$ is: $$ 4 + 2 \sqrt{2} - 2 \times 2 \sqrt{2} = 4 - 2 \sqrt{2} $$ The area of the shaded rectangle is then: $$ (4 + 2\sqrt{2}) \times (4 - 2 \sqrt{2}) = 16 - 8 = 8 $$