The work done by [tex]\vec F[/tex] along the given path C from A to B is given by the line integral,
[tex]\displaystyle \int_C \mathbf F\cdot\mathrm d\mathbf r[/tex]
I assume the path itself is a line segment, which can be parameterized by
[tex]\vec r(t) = (1-t)(-2\,\vec\imath + 5\,\vec\jmath) + t(4\,\vec\imath+7\,\vec\jmath) \\\\ \vec r(t) = (6t-2)\,\vec\imath+(2t+5)\,\vec\jmath \\\\ \vec r(t) = x(t)\,\vec\imath + y(t)\,\vec\jmath[/tex]
with 0 ≤ t ≤ 1. Then the work performed by F along C is
[tex]\displaystyle \int_0^1 \left(6x(t)^3\,\vec\imath-4y(t)\,\vec\jmath\right)\cdot\frac{\mathrm d}{\mathrm dt}\left[x(t)\,\vec\imath + y(t)\,\vec\jmath\right]\,\mathrm dt \\\\ = \int_0^1 (288(3t-1)^3-8(2t+5)) \,\mathrm dt = \boxed{312}[/tex]