Answer
The magnitude of the force is $800\mathrm{N}$ and the direction is the $-x$ direction.
Work Step by Step
Final Momentum $p_{fx} = -2\mathrm{kg. m/s}$.
Initial Momentum $p_{ix} = 6\mathrm{kg. m/s}$.
Change in momentum $\Delta p_x = p_{fx}-p_{ix} = -2-6 = -8\mathrm{kg. m/s}$.
Duration of collision $\Delta t = 10\mathrm{ms} = 10\times 10^{-3}\mathrm{s} = 10^{-2}\mathrm{s}$.
Average force on the object during the collision $$ is defined as
$ = \Delta p_x/\Delta t$, which in our case is $ = \frac{-8\mathrm{kg. m/s}}{10^{-2}\mathrm{s}} = -800\mathrm{N}$.
Thus the magnitude of the force is $800\mathrm{N}$ and the direction is the $-x$ direction.