W only equals Fs if the vectors are both in the same direction.
You want the dot product of the Vectors Force and displacement.
That is given for vectors v and w by [tex]v^{\rightarrow} \cdot w^{\rightarrow} = ||v^{\rightarrow}|| ||w^{\rightarrow}|| \cos \theta[/tex] Where [tex]||v^{\rightarrow}||[/tex] is the magnitude of vector v. Same would apply to w. Theta is the angle between the two vectors.
So for work we will have two vectors given, the Force and displacement. Since we only want the force vector in the same direction as the displacement, we break it into 2 components, Force Parallel to displacement, and Force Perpendicular to Displacement.
Draw a simple right angle triangle with F vector as the hypotenuse, and draw the other 2 sides as the components, Parallel and Perpendicular. It is easy to see from the diagram that the Parallel vector is given by the F vector multiplyed by cos theta, and Perpendicular Vector by sin theta.
This ties in with common sense, because If the angle is zero, then there is no perpendicular force, and Fsin theta shows that. And the parallel force is the only force is the angle is zero, also shown by the formula.
Using those, you can find out the Magnitude of the Parallel vector, which is Fcos theta, multiply it by s and we get the work done :).
Sorry if a lot of this was old knowledge, i did it just incase you didnt know.