Sum of four term in GDP is 30 sum of first and fourth terms is 18 then find the term

a(r^4-1)/(r-1) = 30

a + ar^3 = 18

(r^4-1)/((r-1)(1+r^3)) = 5/3
3r^4-3 = 5r^4-5r^3+5r-5
2r^4-5r^3+5r-2 = 0
(r-1)(r-2)(r+1)(2r-1) = 0
r = 1/2, 1, 2, -1

r=1,-1: extraneous solutions
r=2: 2,4,8,16,...
r=1/2: 16,8,4,2,...