According to this equation
F = G × m₁*m₂ ÷ r²
other than the mass, the distance also affects the gravitational force between two objects (same mass or not).
Therefore the correct answer is B. The distance between the objects
Future note* use formulas to help you figure these sort of questions out. (if they have a formula to begin with).