Newtons Law of Gravitation states that the Gravitational force between two bodies is directly proportional to the product of their masses and inversely proportional to the square of the distance between them.

Therefore, ##Fpropm_1*m_2## and, ##Fprop1/r^2##

From the rules of joint proportionality we have ##Fprop(m_1*m_2)/r^2##

Thus ##F=G(m_1*m_2)/r^2## , where ##G## is the Universal Gravitational constant. Its value is ##6.67*10^-11 m^3 kg^-1 sec^-2##