Uniform spheres attract as if their masses were at their centres, so the potential energy of the pair at centre separation r is
U(r)=−rGm1m2,m1m2=4×6=24 kg2
Pulled slowly (no change in kinetic energy), the work done equals the change in potential energy:
W=U(0.6)−U(0.2)=Gm1m2(0.21−0.61)=24G(5−35)=80G
W=80×6.67×10−11 J=5.34×10−9 J
The minimum work is 5.34×10−9 J, and the potential energy increases by this amount (from −120G to −40G: it becomes less negative).
The work is positive because gravity is attractive: to separate the spheres the external force must act outward, in the same direction as each sphere's displacement, against the gravitational pull.