Parameterize the line segment (call it [tex]C[/tex]) by
[tex]\mathbf r(t)=\langle0,0,1\rangle(1-t)+\langle2,1,0\rangle t=\langle2t,t,1-t\rangle[/tex]
where [tex]0\le t\le1[/tex]. Then the work done by [tex]\mathbf f(x,y,z)[/tex] along the line segment is
[tex]\displaystyle\int_C\mathbf f(x,y,z)\cdot\mathrm d\mathbf r=\int_{t=0}^{t=1}\mathbf f(x(t),y(t),z(t))\cdot\langle2,1,-1\rangle\,\mathrm dt[/tex]
[tex]=\displaystyle\int_0^1\langle2t-t^2,t-(1-t)^2,(1-t)-(2t)^2\rangle\cdot\langle2,1,-1\rangle\,\mathrm dt[/tex]
[tex]=\displaystyle\int_0^1(t^2+8t-2)\,\mathrm dt=\frac73[/tex]