You start off with 8 kg and 4kg and end up with 32kg and 12kg, so the attraction due to the mass change is (8 x 4) compared to (32 x 12) ie, 12 times greater.
The separation is increased from 20cm to 40cm ie, doubled, so the attraction is only 1/4 of the original.
So, the net change is 12/4 = 3 times the original.
using the formula: F = Gx m1 xm2 /d**2
F1 = G x 8 x 4/20**2 = G x 32/400.
F2 = G 32 x 12 / 40**2 = G x 384/1600
F1/F2 = 1/3
Note that the questions are asking for change (eg, double, half etc) , so the actual values do not matter. The fact that I am using cm for separation, rather than metres (for the MKS system) does not affect the answer to the question.