This question already has an answer here:
As suggested in the comment above, expand along the first row:
$$\mathrm{det}(tI_n-A) = \mathrm{det} \begin{pmatrix} t & 0 & \cdots & 0 & a_0 \\
-1 & t & \cdots & 0 & a_1 \\
\vdots & \ddots & \ddots & \vdots & \vdots \\
0 & 0 & \cdots & -1 & t+a_{n-1} \end{pmatrix} = $$
$$ t \cdot \mathrm{det} \; \begin{pmatrix} t & 0 & \cdots & 0 & a_1 \\
-1 & t & \cdots & 0 & a_2 \\
\vdots & \ddots & \ddots & \vdots & \vdots \\
0 & 0 & \cdots & -1 & t+a_{n-1} \end{pmatrix} +
(-1)^{1+n} a_0 \cdot \mathrm{det} \begin{pmatrix} -1 & t & 0 & \cdots & 0 \\
0 & -1 & t & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots & \vdots \\
0 & 0 & \cdots & 0 & -1 & \end{pmatrix} $$
By induction we can replace the determinant on the left by $a_1+a_2t+\cdots+a_{n-1}t^{n-2}+t^{n-1}$ and the second matrix’s determinant is the product of its diagonals (since it’s upper-triangular). The product of the diagonals is $(-1)^{n-1}$. Therefore, the determinant is $t(a_1+a_2t+\cdots+a_{n-1}t^{n-2}+t^{n-1})+(-1)^{n+1}(-1)^{n-1}a_0$. Which simplifies to $a_0+a_1t+\cdots+a_{n-1}t^{n-1}+t^n$.
[When writing this up, don’t forget the base case for the induction.]