Soln:
Let first term = a and last term = b of GP.
According to the given condition, the sum of first four terms is 30 i.e.
a + ar + ar^2 + ar^3 = 30
a (1 + r + r^2 + r^3) = 30
2 (1 + r + r^2 + r^3) = 30
(1 + r + r^2 + r^3) = 15 ..................eqn(i)
According to the second condition, the sum of last four terms is 960 i.e.
b/r^3 + b/r^2 + b/r + b = 960
b(1/r^3 + 1/r^2 + 1/r + 1) = 960
(1 + r + r^2 + r^3)/(r^3) = 960/512
15/r^3 = 1.875
r^3 = 15/1.875
r^3 = 8
r^3 = 2^3
r = 2
Hence, common ratio is 2. Ans