A force is doing work if there is a displacement of the object, on which the force is acting, along with the direction of the force.
Mathemactly the work is defined as a dot product between the force and the displacement vector.
[tex]W=\textbf{F} \cdot \textbf{L}=\sum_{i} F_iL_i[/tex]
Where [tex] F_i and L_i [/tex] are the components of these vectors.
In our case we have the displacement only in the x-direction:
[tex]W=F_xL_x=2.3\cdot0.34=0.782 $N[/tex]