According to Newton's law of universal gravitation, the force of gravity between two objects is directly proportional to the product of their masses and inversely proportional to the square of the distance between them. The equation is F = Gm1m2/r^2, Where F is the force of gravity, G is the gravitational constant, m1 and m2 are the masses of the two objects, and r is the distance between them.
If the masses of two objects remain constant but the distance between them decreases, the force of gravity between them will increase. This is because the distance term in the equation becomes smaller, causing the overall value of the force to increase. In other words, bringing two objects closer together increases the strength of the gravitational pull between them.