That means the particle is at a distance where it just overcomes the attract of planet1 and is just attracted towards planet2.This means that force on the particle due to planet1 and planet2 are equal and opposite.Let the particle be at a distance x from the planet1,so the distance of it from planet2 is (2r-x).Let M be the mass of the planets and m is the mass of the particle.
At a distance x=r from planet1 the potential energy of the planet is
GMm/x+GMm/(2r-x)=2GMm/r (because potential always adds up).
The kinetic energy with which the body must be projected is
Hope this helps.