To minimize the calculation, 3 numbers in G.P. can be taken as ra,a,ar where, a is the first term and r is the common ratio.
Given product of three numbers is 512.
⇒ra.a.ar=512⇒a3=83⇒a=8
Also given, ra+4,a+4,ar are in
A.P.⇒2(a+4)=ra+4+ar
Putting a=8, we get
2(12)=r8+4+8r
⇒2r2−5r+2=0
⇒(2r−1)(r−2)=0
⇒r=2 or 21
Hence, numbers may be 4,8,16 or 16,8,4
In both the cases, sum =4+8+16=28.