Answer
$a_8=31
\text{ and }
a_n=-9+5n
$
Work Step by Step
$\bf{\text{Solution Outline:}}$
To find $a_8$ and $a_n$ in the given sequence
\begin{array}{l}\require{cancel}
a_1=-4, a_5=16
,\end{array}
use the formula for finding the $n$th term of an arithmetic sequence.
$\bf{\text{Solution Details:}}$
Using the formula for finding the $n^{th}$ term of an arithmetic sequence, which is given by $a_n=a_1+(n-1)d,$ then
\begin{array}{l}\require{cancel}
a_5=a_1+(5-1)d
\\\\
a_5=a_1+4d
.\end{array}
With $a_1=-4$ and $a_5=16,$ then
\begin{array}{l}\require{cancel}
a_5=a_1+4d
\\\\
16=-4+4d
\\\\
16+4=4d
\\\\
20=4d
\\\\
\dfrac{20}{4}=d
\\\\
d=5
.\end{array}
Using $a_n=a_1+(n-1)d$ with $a_1=-4$ and $d=5$ then
\begin{array}{l}\require{cancel}
a_n=-4+(n-1)5
\\\\
a_n=-4+5n-5
\\\\
a_n=-9+5n
.\end{array}
With $n=8,$ then
\begin{array}{l}\require{cancel}
a_8=-9+5(8)
\\\\
a_8=-9+40
\\\\
a_8=31
.\end{array}
Hence, $
a_8=31
\text{ and }
a_n=-9+5n
.$