An octagon is inscribed in a circle. The octagon has vertices P1,P2, ... P8 around the circumference of the circle.

Vertices P1,P3,P5,P7 form a square of area 5 and sides $\displaystyle \sqrt{5}$

Vertices P2,P4,P6,P8 form a rectangle of area 4 and sides of length $\displaystyle \sqrt{2}$ and $\displaystyle 2\sqrt{2}$

How do I find the maximum area of the octagon? Thanks!