Example 13. A regular octagon inscribed in a circle has four adjacent sides of length 2, and the other four sides of length 3. Find the area of this octagon.


Solve as shown in Figure 13,
Let $AB = BC = CD = DE = 3$,
$EF = FG = GH = HA = 2$. Connect
$O$ to each point. Clearly, the area of the octagon (denoted as $S$) is the sum of the areas of the 8 triangles, i.e., four times the sum of the areas of $\triangle OHA$ and $\triangle OAB$. That is,
$$
\begin{array}{l}
S = 4\left(S \triangle_{\mathrm{OHA}} + S \triangle_{\mathrm{OAB}}\right) \\
= 4 S_{\text{quadrilateral } O \mathrm{HAB}} \\
= 4\left(S \triangle_{\mathrm{OHB}} + S \triangle_{\mathrm{AHB}}\right) \text{. } \\
\end{array}
$$

In $\triangle AHB$, $\angle A$ is a circumangle, subtending $\frac{3}{4}$ of the arc, i.e., $\angle A = 135^{\circ}$.
$\therefore$ According to the cosine rule, we get:
$$
H B^{2} = 13 + 6 \sqrt{2} \text{. }
$$

In $\triangle OHB$, $\angle HOB$ is a central angle, subtending $\frac{1}{4}$ of the arc.
Thus, $\triangle HOB$ is an isosceles right triangle.
$$
S \triangle_{\mathrm{OHB}} = \frac{1}{4} H B^{2} = \frac{1}{4}(13 + 6 \sqrt{2}) \text{. }
$$

And $S \triangle_{\mathrm{AHB}} = \frac{1}{2} A H \cdot A B \cdot \sin A$
$$
\begin{aligned}
& = \frac{3}{2} \sqrt{2} . \\
\therefore \quad S & = 4\left(S \triangle \mathrm{OHB} + S \triangle_{\mathrm{AHB}}\right) \\
& = 13 + 12 \sqrt{2} .
\end{aligned}
$$