Answer:
F = 5000 [N] or 5 [kN]
Explanation:
In order to solve this problem we must take into account Newton's second law, which tells us that the sum of all forces applied on a body must be equal to the product of the mass of the body by its acceleration.
F = m*a
where:
F = force [N]
m = mass = 1000 [kg]
a = acceleration = 5 [m/s^2]
F = (1000*5)
F = 5000 [N] or 5 [kN]
Assuming the earth and the sun to be perfect spheres,
Volume of the sphere = 4/3 * pi * (r**3)
Volume of the earth = 4/3 * pi * ((4000*1.609 km)**3) = 1.116 E 12 km3
Volume of the Sun= 4/3 * pi * ((7 E 5 km)**3) = 1.436 E 18 km3
Density = mass /volume
Density of earth = 6 E 24 kg / 1.116 E 12 km3 = 5.376 E 12 [kg/km3]
Density of Sun= 2 E 30 kg / 1.436 E 18 km3 = 1.392 E 12 [kg/km3]
Density of earth / Density of Sun =
5.376 E 12 [kg/km3] / 1.392 E 12 [kg/km3] = 3.86
This type of a problem can be solved by considering energy transformations. Initially, the spring is compressed, thus having stored something called an elastic potential energy. This energy is proportional to the square of the spring displacement d from its normal (neutral position) and the spring constant k:

So, this spring is storing almost 12 Joules of potential energy. This energy is ready to be transformed into the kinetic energy when the masses are released. There are two 0.2kg masses that will be moving away from each other, their total kinetic energy after the release equaling the elastic energy prior to the release (no losses, since there is no friction to be reckoned with).
The kinetic energy of a mass m moving with a velocity v is given by:

And we know that the energies are conserved, so the two kinetic energies will equal the elastic potential one:

From this we can determine the speed of the mass:

The speed will be 7.74m/s in in one direction (+), and same magnitude in the opposite direction (-).