Answer
See the detailed answer below.
Work Step by Step
We are given that the distance between the centers of the two planets initially was $r_i=1.0\times 10^{11}\;\rm m$ and we need to find their velocities just before they collide.
Noting that the distance between their centers before the collision is the sum of their radius and is then $r_f=2R_J=2R$.
We can assume that the system [the two planets] is isolated which means that the energy and the momentum of the system are conserved.
$$E_i=E_f$$
$$K_i+U_{gi}=K_f+U_{gf} $$
The two planets were released from rest, so $K_i=0$
$$0+\dfrac{−Gm_1m_2}{r_i}=\frac{1}{2}m_1v^2_{1f}+\frac{1}{2}m_2v^2_{2f}+\dfrac{−Gm_1m_2}{r_f}$$
where $m_1=m_2=M_{Jupiter}=M$ ;
$$ \dfrac{−GM^{ \color{red}{\bf\not}2}}{r_i}=\frac{1}{2} \color{red}{\bf\not}Mv^2_{1f}+\frac{1}{2} \color{red}{\bf\not}Mv^2_{2f}+\dfrac{−GM^{ \color{red}{\bf\not}2}}{2R}$$
$$ \dfrac{−GM }{r_i}=\frac{1}{2} v^2_{1f}+\frac{1}{2} v^2_{2f}+\dfrac{−GM }{2R}$$
$$ \dfrac{−2GM }{r_i}= v^2_{1f}+ v^2_{2f}+\dfrac{−GM }{ R}$$
Hence,
$$ v^2_{1f}+ v^2_{2f}= \dfrac{−2GM }{r_i} +\dfrac{ GM }{ R}\tag 1$$
The conservation of momentum;
$$p_i=p_f$$
The two planets start from rest, so $p_i=0$
$$0=p_f=m_1v_{1f}−m_2v_{2f}$$
The negative sign is due to the velocity direction, as seen in the figure below, where we chose right to be the positive direction which is the direction of the planet's 1 velocity.
Hence,
$$ \color{red}{\bf\not}Mv_{1f}= \color{red}{\bf\not}Mv_{2f}$$
$$v_{1f}=v_{2f}\tag2$$
Plugging into (1);
$$ v^2_{1f}+ v^2_{1f}= \dfrac{−2GM }{r_i} +\dfrac{ GM }{ R} $$
$$ 2 v^2_{1f}= \dfrac{−2GM }{r_i} +\dfrac{ GM }{ R} $$
$$ v_{1f}=\sqrt{ \dfrac{− GM }{r_i} +\dfrac{ GM }{ 2R} }$$
Plugging the known;
$$ v_{1f}=\sqrt{ (6.67\times 10^{-11})(1.9\times 10^{27})\left(\dfrac{− 1 }{1.0\times 10^{11}} +\dfrac{ 1 }{ 2(6.99\times 10^7)}\right) }$$
Therefore,
$$v_{1f}=v_{2f}=\color{red}{\bf 3.0\times 10^4}\;\rm m/s$$