Let the first three terms of the GP be ra,a,ar
Product of the first three terms = 27
ra×a×ar=27
a=3
Sum of the first three terms =r3+3+3r=3+3(r+r1)
Now if r>0, then r+r1≥2 => 3(r+r1)≥6 => 3+3(r+r1)≥9
Now if r<0, then r+r1≤−2 => 3(r+r1)≤−6 => 3+3(r+r1)≤−3
Therefore, the possible values of the sum of the first three terms will be every real number not in the range of (−3,9)
Thus, the values will be R−(−3,9)
a=−3 and b=9
a2+b2=(−3)2+92=90