A regular polygon with n sides can always have a circle made which touches all the vertices of the
polygon, so all the particles are the same distance from the center of the circle.
Unless you are working this problem for a very high-level college physics course, you must make a simplifying assumption:
The mass of all n particles acts as though it is concentrated at the center of the circle and does not change its location when either of the particles leaves and goes to "infinity".
The first assumption is approximately valid for large enough values of n: that is for many particles
and many sides to the polygon.
With this assumption, the gravitational potential energies p1 and p2 are both directly proportional to the product of the smaller mass "m" times the larger mass "M" in each case. In each case, all other factors in calculating a p-value do not change between p1 and p2.
The gravitational energy in each case must be equal in magnitude to the kinetic energy lost by the particle of mass going from k1 or k2 to zero at infinity, as per the definition of "escape velocity" for that kinetic energy. This means that
k1 = -p1 and k2 = -p2 , and thus
k1/k2 = -p1/(-p2) =p1/p2
The mass left behind for the first particle is just (n-1)*m , and
the mass left behind for the second particle is (n-2)*m.
Thus
p1/p2 = A*m[(m)(n-1)/{A*[m(m)(n-2) = (n-1)/(n-2) , where the "A" is a factor which does not change between the two cases.
So now
k1/k2 = p1/p2 = (n-1)/(n-2)
k1 = [(n-1)/(n-2)]*k2
Thus k1-k2 = [(n-1)/(n-2)]*k2 - k2 = [(n-1)/(n-2)-1]*k2 ,
Or k1-k2 = k1/[(n-1)/(n-2)-1] = {1/[(n-1)/(n-2)-1]}*k1
This equation gives the energy difference as a fraction of the energy of the first
particle to leave.
If you know calculus you can integrate and find an expression for the gravitational potential energy (or if you have been given an equation for it)
p = -2G(m)(M)/R , where G is Newton's gravitational constant, R is the radius of the circle, and M is the total mass left behind in each case.
Thus
p1 = -2G(m)[m(n-1)]/R
The chord of the circle between any two adjacent vertices is "a", so the central angle for the chord is 2*pi/n (pi = 3.1416). The chord length is related to the radius by
a =2R*sin[(2*pi/n)/2] , so
R = (a/2)/sin(pi/n) and 1/R = 2*sin(pi/n)/a
Then
k1 = -p1 gives
k1 = 2G(m)[m(n-1)]*2*sin(pi/n)/a simplify this by combining factors and then substitute it into the expression found above