Let a be the first term and and r be the common ratio of the GP. From the given problem,
a + arn - 1 = 66 ...(i)
Also, ar x arn - 2 = 128 ⇒ a2rn - 1 = 128 ... (ii)
From Eq. (ii),
a.arn - 1 = 128
arn - 1 = 128/ a
On substitution this in Eq.(i), we get
a + 128/a = 66
a2 - 66a + 128 = 0
a = [-b ± √b2 - 4ac] /2a
= 66 ± √662 - 4 x 128 x 1)/2 = 64 or 2