The gravitational force of attraction between two objects in directly proportional to the product of their masses and inversely proportional to the square of the distance between them, according to the law of universal gravitation:
`F = g(m_1m_2)/(r^2)`
The univeral gravitational constant g is 6.674×10−11 N⋅m2/kg2, but since it factors in the same for each pair of objects, it's not necessary to calculate F to be able to rank them:
Pair 1: (1)(2)/1 = 2
Pair 2: (1)(2)/4 = 0.5
Pair 3: (2)(2)/1 = 4
So the 3rd pair has the largest force of gravitational attraction, followed by the first pair and the second pair has the smallest force of gravitational attraction.
You can probably see from this example that this can be figured out mentally. Increasing the mass of either object increases the force between them by the same factor, and increasing the distance between them reduces the force by the square of the factor, for example doubling the distance reduced the force of attraction to 1/4 the original force.