You are given two locations - A and B - in the space surrounding two different planets. The g value for the two locations differ for two different reasons - the planet mass creating the gravitational field is different for the two locations and the distance from the location to the center of the planet is different. You are asked to determine which location has the greatest gravitational field strength and you are asked to determine how many times greater it is. You will have to consider both of these factors.
The relationship between the gravitational field strength (g) and the variables that affect it is given by the following porportionality:

For two locations in the example problem above (see About This Question), Location A has twice the planet mass. This factor tends to make the g value greatest for Location A. And Location A is closer to the planet's center. Since the g value and distance (squared) are inversely proportional, Location A's smaller distance also makes the g value greatest for Location A. So both the planet mass factor and the distance factor favor Location A as having the greatest g value.
Now you have to determine how many times greater the g value is for this Location A (referring to the sameple problem above). The proportionality statement suggests that three times the planet mass would result in a gravitational field strength that is three times greater. And the same statement suggests that being one-half the distance from the planet's center makes the gravitational field strength four times greater. This is because of the inverse square relatonship between the g value and distance. If distance is two times less, then the g value is 22 times greater. Putting both of these factors together - the planet mass factor and the distance factor - will allow you to determine how many times greater the g value is for Location A than Location B.