Some todas as linhas a primeira linha para obter (isso não altera o determinante)
\[\left[\begin{array}{ccccc}
a +(n-1)b & a +(n-1)b & a +(n-1)b & \cdots & a +(n-1)b\\
b & a & b & \cdots & b\\
b & b & a & \cdots & b\\
\vdots & \vdots & \vdots & \vdots & \vdots \\
b & b & b & \cdots & a\\
\end{array}\right]\]
Note que
\[\left|\begin{array}{ccccc}
a +(n-1)b & a +(n-1)b & a +(n-1)b & \cdots & a +(n-1)b\\
b & a & b & \cdots & b\\
b & b & a & \cdots & b\\
\vdots & \vdots & \vdots & \vdots & \vdots \\
b & b & b & \cdots & a\\
\end{array}\right|\\=(a+(n-1)b) \left|\begin{array}{ccccc}
1 & 1 & 1 & \cdots & 1\\
b & a & b & \cdots & b\\
b & b & a & \cdots & b\\
\vdots & \vdots & \vdots & \vdots & \vdots \\
b & b & b & \cdots & a\\
\end{array}\right|.\]
Subtraia de todas as linhas a primeira linha multiplicada por \(b\) (também não altera o determinante), para chegar a
\[\left[\begin{array}{ccccc}
1 & 1 & 1& \cdots & 1\\
0 & a-b & 0 & \cdots & 0\\
0 & 0 & a-b & \cdots & 0\\
\vdots & \vdots & \vdots & \vdots & \vdots \\
0 & 0 & 0 & \cdots & a-b\\
\end{array}\right]\]
que é uma matriz triangular superior (cujo determinante pode ser calculado pelo produto da diagonal principal). Logo o determinante procurado é
\((a+(n-1)b)\times (a-b)^{n-1}\).