Hello Edel!
From the way you wrote your response to
a, I think that you have got the correct result just because the displacement was negative. I might be wrong, though.
For a constant force and a finite displacement with a constant direction, the work is defined as ##W=\vec F\cdot\Delta\vec s##, where ##\vec F## is the vector of the force for which you want to find the work, and ##\Delta\vec s## is the displacement vector.
We have, then, that ##W=|\vec F||\Delta\vec s|\cos\theta=(|\vec F|\cos\theta)|\Delta\vec s|=\overline{F_{||}}\times|\Delta\vec s|##.
##\theta## is the smallest angle you can make between the two vectors; If you draw two segments starting from the same point, then, starting from one vector, you can either rotate right or left to reach the other one.
##\overline{F_{||}}## represents the "signed" force in the direction of the displacement, i.e it can be positive or negative, depending ##\cos\theta##. (one can also leave force as it is and think of the "signed" component of the displacement in the direction of force, and it is more useful when the displacement's direction is variable while that of the force is constant.)
If the angle between your force vector and your displacement vector is
not in ##(-\frac{\pi}{2},\,\frac{\pi}{2})##, then ##\overline{F_{||}}\leq0##. It is ##0## if ##\theta## takes either ##\pi/2## or ##-\pi/2##, because ##\cos\pm\frac{\pi}{2}=0##.
Let's go back to your problem (she has already solved it, don't delete my comment mods):
$$\Delta\vec s=\vec x_f-\vec x_i=(-5.0-1.0)\hat\imath\\
\vec F=50\hat\imath+12\hat\jmath$$
You can see from the values of ##\vec F## that it points right from the up direction, and from the values of ##\Delta\vec s## that it points directly to the left direction. This tells us that the smallest angle between the two forces is obtuse, hence ##\overline{F_{||}}## is negative.
To calculate the work, just plug in the values: ##W=-|F_{||}||\Delta\vec s|=-1\times50\times6.0=-30.\times10^1\mathrm J##
To find the angle, also use the work formula, and I think that this was the aim of question
b.
##W=|\vec F||\Delta\vec s|\cos\theta=-30.\times10^1##, thus ##\cos\theta=\frac{-30.\times10^1}{|\vec F||\Delta\vec s|}\Leftrightarrow\theta=\arccos\left(\frac{-30.\times10^1}{|\vec F||\Delta\vec s|}\right)\approx166.5^\circ\approx \left(17.\times10^1\right)^\circ##.
Sorry for the long post.

For other usages, another definition of the dot product ##\vec u\cdot\vec v## is ##\left(u_xv_x+u_yv_y+u_zv_z+...\right)##. The ##+...## is for higher dimensions, you stop at what you have.