The octagon ABCDEFGH is inscribed in a circle, with the vertices around the circumference in the given order. Given that the polygon ACEG is a square of area 5 and the polygon BDFH is a rectangle of area 4, find the maximum possible area of the octagon.

The required maximum possible area of the octagon, correct to six places of decimals, is 6.708204