The free body diagram is given by,

The normal force on the block is given by,
Here, m is the mass of the block and g is the acceleration due to gravity.
Substitute all the values in the above,
The friction force on the block is given by,
Here, is the coefficient of friction, and Nis the normal force.
Substitute all the values in the above,
The work done is given by,
Here, F is the constant external force, and x is the compressed distance.
Substitute all the values in the above,
The work done on the spring is given by,
Here, k is the force constant, and x is the length of compression.
Substitute all the values in the above,
role="math" localid="1665143890891"
The work done due to friction force is given by,
Substitute all the values in the above,
The net work done is given by,
Substitute all the values in the above,
Also, the net work done of the block is difference between the kinetic energies which can be given by,
Here, m is the mass of the block, is the final velocity of the block and is the initial velocity of the block whose value is zero.
Substitute all the values in the above, the final velocity of the
Thus, the speed of the block is