To develop this problem it is necessary to apply the concepts related to Gravitational Potential Energy.
Gravitational potential energy can be defined as
[tex]PE = -\frac{GMm}{R}[/tex]
As M=m, then
[tex]PE = -\frac{Gm^2}{R}[/tex]
Where,
m = Mass
G =Gravitational Universal Constant
R = Distance /Radius
PART A) As half its initial value is u'=2u, then
[tex]U = -\frac{2Gm^2}{R}[/tex]
[tex]dU = -\frac{2Gm^2}{R}[/tex]
[tex]dKE = -dU[/tex]
Therefore replacing we have that,
[tex]\frac{1}{2}mv^2 =\frac{Gm^2}{2R}[/tex]
Re-arrange to find v,
[tex]v= \sqrt{\frac{Gm}{R}}[/tex]
[tex]v = \sqrt{\frac{6.67*10^{-11}*1*10^{28}}{1*10^{12}}}[/tex]
[tex]v = 816.7m/s[/tex]
Therefore the velocity when the separation has decreased to one-half its initial value is 816m/s
PART B) With a final separation distance of 2r, we have that
[tex]2r = 2*10^3m[/tex]
Therefore
[tex]dU = Gm^2(\frac{1}{R}-\frac{1}{2r})[/tex]
[tex]v = \sqrt{Gm(\frac{1}{2r}-\frac{1}{R})}[/tex]
[tex]v = \sqrt{6.67*10^{-11}*10^{28}(\frac{1}{2*10^3}-\frac{1}{10^{12}})}[/tex]
[tex]v = 1.83*10^7m/s[/tex]
Therefore the velocity when they are about to collide is [tex]1.83*10^7m/s[/tex]