Answer
$F_x = 4N $
Work Step by Step
$U(x) = -W_x$
Potential Energy of Work Done by horizontal force ($F_x$) through a
distance in the x-direction ($d_x$)
$U(x) = -F_x d_x$
$U(2) = -(F_x \times 2m)$
$-8J = -(F_x \times 2m)$
$8J = F_x \times 2m$
$F_x =\frac{8J}{2m} $
$F_x = 4N $