The path can be parameterized by [tex]\mathbf r(t)=\langle0,0,1\rangle(1-t)+\langle3,1,0\rangle t=\langle3t,t,1-t\rangle[/tex] with [tex]0\le t\le1[/tex]. So, the work done by [tex]\mathbf F(x,y,z)=\langle x-y^2,y-z^2,z-x^2\rangle[/tex] is given by the line integral
[tex]\displaystyle\int_C\mathbf F\cdot\mathrm d\mathbf r[/tex]
where [tex]C[/tex] is the line segment. Equivalently,
[tex]\displaystyle\int_{t=0}^{t=1}\langle3t-t^2,t-(1-t)^2,1-t-9t^2\rangle\cdot\langle3,1,-1\rangle\,\mathrm dt[/tex]
[tex]=\displaystyle\int_0^1(5t^2+13t-2)\,\mathrm dt[/tex]
[tex]=\dfrac{37}6[/tex]