Example 3 Color each vertex of an $n(n \geqslant 3)$-sided polygon with one color, such that the endpoints of the same edge have different colors. If there are $m(m \geqslant 3)$ colors available, then the total number of different coloring methods is
$b_{n}=(m-1)\left[(m-1)^{n-1}+(-1)^{n}\right]$