easy
recall that
an=a1(r)^(n-1)
so
given 2nd and 5th term
we get
a2 and a5
so
a2=a1(r)^(2-1)=a1(r)^1=a1r
a5=a1(r)^(5-1)=a1(r)^4
also remember that [tex] \frac{x^m}{x^n}=x^{m-n} [/tex]
so
[tex] \frac{a_5}{a_2}= \frac{a_1r^4}{a_1r^1} =r^{4-1}=r^3= \frac{512}{-8}=-64 [/tex]
so r^3=-64
cube root
r=-4
so
a2=a1r=-8
a2=a1(-4)=-8
divide both sides by -4
a1=2
so
equation is
[tex]a_n=2(-4)^{n-1}[/tex]
C isi the answer