According to the Newton's universal law of gravitation,
Case 1 : F1=Gm1M1R21
Case 2 : F2=Gm2M2R22
But it is given that R2=6R1
F2=Gm2M2(6R1)2⇒F2=Gm1M1(6R1)2⇒F2=Gm1M136(R1)2⇒F2=F136
So, the masses of one of them have to be altered to 36 times, to maintain the same gravitational force because the gravitational force is directly proportional to the product of the masses.