Answer:
k = 2560 N/m
Explanation:
To find the spring constant, you take into account that all the kinetic energy of the block becomes elastic potential energy in the spring, when the block compressed totally the spring:

m: mass of the block = 4.0kg
v: velocity of the block just before it hits the spring
x: compression of the spring = 0.25m
k: spring constant = ?
You solve the previous equation for k:
(1)
Then, you have to calculate the velocity v of the block. First, you calculate the acceleration of the block by using the second Newton law:

F: force over the block = 10.0N
a: acceleration

With this value of a you can calculate the final velocity after teh block has traveled a distance of 8.0m:

vo: initial velocity = 0m/s
d: distance = 8.0m

Now, you can calculate the spring constant by using the equation (1):

hence, the spring constant is 2560 N/m