#### Answer

force is acting in negative $x$ direction

#### Work Step by Step

Work done by the force:
$W=-\Delta U=-\left( U_{c}-U_{A}\right) =-\left( 45-15\right) =-30J$
Then,
$W=F\Delta x=F\times \left( 6-5\right) =F\times 1m=-30J\Rightarrow F=-30N$
The minus sign means that the force is acting in negative $x$ direction.