See the picture,
Consider the Grey sphere to be the big sphere and the yellow sphere to be smaller one with negative density( 1. We are applying superposition principle . 2. So if u superimpose the 2 u shud get the sphere on the LHS and hence it must have neg.density)
Now within the first sphere i have made dotted sphere of radius l from the center, from which we can calculate the gravitational field using the formula for a distance l.
Now do that for other sphere.(but at any other pt).
Now vector addn , u 'll get a constant value. A variant of this in electrostatics was asked in 2007 paper btw.
I 'll put the ans tomm. ,need to go to sleep. (sorry , but u can get it from this pt)