Let the first term be a and the common ratio be r.
The first sum is a1−r=2
Now, the terms have been cubed, so the sum becomes a31−r3=24
Substituting a to be 2(1−r) in the second equation, we get 8(1−r)3=24(1−r3)
⇒1−3r+3r2−r3=3−3r3
⇒2r3+3r2−3r−2=0
⇒(r−1)(2r2+5r+2)=0
So, r=1,−0.5,−2
r cannot be 1,and also −2 is not allowed since the terms have to reduce, so r is −0.5, we get a=2(1−r)=3