This question has options. Is the word "work" used in the same way in the following two sentences?

I will work hard to improve my grades.

John worked with Paul at finishing the task.

pick from the following.
(A). different meanings;
(B). the same meaning;
(B).