first of all we have the 5th term and 2nd term
T5=768 =a*r^4
T2=-12=a*r ^1
make a subject of formula in the both equations
that is a=T2/r and T5/r^4
a=12/r and a=768/r^4
when u equate them u will get
-64=r^3 so r=-4 then to find a that is 1st term
since second term is T2=a*r=12 an r=-4 then
a=12/-4 hence a=-3