You **do not** need to explicitly declare the components $x, y$ nor use $z\bar{z}$, **just express** them in terms of $t$ and solve using antiderivatives. Instead, convert $z$ into the parametric curve function $\gamma(t)$ so you have an integral in respect to $t$ quite familiar in calculus. To deal with the magnitude term, identify the real and imaginary components inside the absolute value bars.

Here, parameterize the curve $\gamma(t) = [2+t] + [it]$ where $t \in [0, 1]$. Note that the the number begins at $2 + 0i$ and both components increase by 1.

Hence, $\gamma(t) = t + 2 + it$, $f(\gamma) = |\gamma|^2$, and $\gamma'(t) = 1 + i$.

Then, we therefore have the integral $\int_0^1 f(\gamma(t))\gamma'(t) \:dt = \int_0^1|t + 2 + it|^2(1 + i) \:dt$, which will be quite familiar in earlier calculus courses. You can proceed easily from here after expressing the magnitude in terms of $t$.

Furthermore, note that this line integral is expressible as $[F(\gamma(t))]^1_0$ where $F$ is the antiderivative of $f$, since the integrand is of the form of the derivative of a function composition (that will be useful for similar line integral problems).

$\int_0^1 |[t + 2] + [it]|^2(1 + i) \:dt$

$= (1 + i)\int_0^1 |[t + 2] + [it]|^2 \:dt$, {$x=[t+2], y=[t]$}

$= (1 + i)\int_0^1 (t+2)^2 + (t)^2 \:dt$, {definition of magnitude}

$= (1 + i)\int_0^1 t^2 + 4t + 4 + t^2 \:dt$

$= (1 + i)\int_0^1 2t^2 + 4t + 4 \:dt$

$= (1 + i)[\frac{2}{3}t^3 + 2t^2 + 4t]^1_0$

$= (1 + i)[\frac{2}{3}(1) + 2(1) + 4(1)] - 0$

$= (1 + i)[\frac{2}{3} + 6]$

$= (1 + i)[\frac{20}{3}]$