5. Color each vertex of a quadrilateral pyramid with one color, and make the endpoints of the same edge have different colors. If only 5 colors are available, then the total number of different coloring methods is


420
5. 【Analysis and Solution】According to the problem, for the quadrilateral pyramid $S-ABCD$, the vertices $S, A, B$ are colored with different colors, and there are $5 \times 4 \times 3=60$ (ways) to color them, as shown in the figure.

When $S, A, B$ are already colored, let's assume their colors are $1, 2, 3$ respectively; if $C$ is colored with color 2, then $D$ can be colored with color 3, 4, or 5, which gives 3 ways to color; if $C$ is colored with color 4, then $D$ can be colored with color 3 or 5, which gives 2 ways to color; if $C$ is colored with color 5, then $D$ can be colored with color 3 or 4, which also gives 2 ways to color. Therefore, when $S, A, B$ are already colored, there are 7 ways to color $C$ and $D$.
Thus, the total number of coloring methods is $60 \times 7=420$.