ANSWER:
[tex]a_n=3\cdot(-4)^{n-1}[/tex]STEP-BY-STEP EXPLANATION:
We have the following formula for nth terms
[tex]a_n=a_1\cdot r^{n-1}^{}[/tex]we replace for each point and we are left
[tex]\begin{gathered} a_2=-12 \\ -12=a_1\cdot r^{2-1}\rightarrow-12=a_1\cdot r^{}\text{ (1)} \\ a_5=768 \\ 768=a_1\cdot r^{5-1}\rightarrow768=a_1\cdot r^4\text{ (2)} \end{gathered}[/tex]We solve the system of equations that remains like this:
[tex]\begin{gathered} a_1=\frac{-12}{r}\text{ (3)} \\ a_1=\frac{768}{r^3}\text{ (4)} \\ \text{we equalize (3) and (4)} \\ -\frac{12}{r}=\frac{768}{r^4} \\ r^3=\frac{768}{-12} \\ r=\sqrt[3]{-64} \\ r=-4 \end{gathered}[/tex]Now, for a1
[tex]\begin{gathered} a_1=\frac{-12}{-4} \\ a_1=3 \end{gathered}[/tex]