Answer
$a_5=-162
\text{ and }
a_n=-2(-3)^{n-1}$
Work Step by Step
$\bf{\text{Solution Outline:}}$
To find $a_5$ and $a_n$ for the given geometric sequence described as
\begin{array}{l}\require{cancel}
-2,6,-18,54,...
,\end{array}
use the formula for finding the $n^{th}$ term of a geometric sequence.
$\bf{\text{Solution Details:}}$
The common ratio, $r,$ is the quotient of a term and the term preceeding it. Hence,
\begin{array}{l}\require{cancel}
r=\dfrac{a_2}{a_1}
\\\\
r=\dfrac{6}{-2}
\\\\
r=-3
.\end{array}
Using the formula for finding the $n^{th}$ term of a geometric sequence, which is given by $a_n=a_1r^{n-1},$ then
\begin{array}{l}\require{cancel}
a_n=a_1r^{n-1}
\\\\
a_n=-2(-3)^{n-1}
.\end{array}
With $n=5,$ the equation above bcomes
\begin{array}{l}\require{cancel}
a_5=-2(-3)^{5-1}
\\\\
a_5=-2(-3)^{4}
\\\\
a_5=-2(81)
\\\\
a_5=-162
.\end{array}
Hence, $
a_5=-162
\text{ and }
a_n=-2(-3)^{n-1}
.$