Parametrization of the first segment:
x=t+1, y=4t, z=1 wherein t is on the segment [0,1].
Second segment:
x=2, y=2t+4, z=2t+1 and again t is in [0,1].
Compute the derivatives like this:
First segment: dx=1dt, dy=4dt, dz=0
Second segment:dx=0, dy=2dt, dz=2dt.
Using the above variables, the given integral becomes like this:

The above integral is classical, and simple computation we obtain:
