Answer
$a_n=5+(n-1)7$
Work Step by Step
The nth term of an arithmetic sequence can be obtained by the following formula: $a_n=a_1+(n-1)d$, where $a_1$ is the first term and $d$ is the common difference.
Hence here: $a_8=(8-1)d+a_1\\a_1=5$
Thus $d=7,a_1=5,a_n=5+(n-1)7$