So you have an integral $\int_\beta f(z)\, dz$ where $\beta$ represents two line segments. First, let's parameterize each one:
$C_1$ goes from $-i$, which means the point is $(0,-1)$, to $2+5i$, which means the point is $(2,5)$, so:
\begin{align}
C_1(t) &= (0,1) + t[(2, 5)-(0,-1)] \\
C_1(t) &= (2t, 6t-1).
\end{align}
$C_2$ goes from $2+5i$, which means the point is $(2,-5)$, to $5i$, which means the point is $(0,5)$, so:
\begin{align}
C_2(t) &= (2,5) + t[(0, 5)-(2,5)] \\
C_2(t) &= (2-2t, 5).
\end{align}
Perfect, you have parametrized $\beta$, now the question is: how do you include this in the integral? You have this function $f(z) = x+iy$ and you have to convert it to $z$ notation, such as this:
\begin{align}
f(z) &= x^2 +iy \\
f(z) &= x -x + x^2 + iy \\
f(z) &= x + iy -x + x^2 \\
f(z) &= z - \dfrac{z + \bar z}{2} + \left(\dfrac{z + \bar z}{2} \right)^2.
\end{align}
And now the integral is:
\begin{align}
\int_\beta f(z) \, dz &= \int_\beta \left[z - \dfrac{z + \bar z}{2} + \left(\dfrac{z + \bar z}{2} \right)^2 \right] \,dz \\
&= \int_{C_1} \left[z - \dfrac{z + \bar z}{2} + \left(\dfrac{z + \bar z}{2} \right)^2 \right] \,dz \\
&+ \int_{C_2} \left[z - \dfrac{z + \bar z}{2} + \left(\dfrac{z + \bar z}{2} \right)^2 \right] \,dz.
\end{align}
Before you put $C_1(t)$ and $C_2(t)$, you have to convert them to $z$ notation, which might be strange but it is easy:
\begin{align}
C_1(t) &= z_1(t) = 2t + i(6t-1) \\
C_2(t) &= z_2(t) = 2 -2t + 5i.
\end{align}
Let's do the first intregal:
\begin{align}
\int_{C_1} \left[z - \dfrac{z + \bar z}{2} + \left(\dfrac{z + \bar z}{2} \right)^2 \right] \,dz \\ &= \int_0^1 \left(2t + i(6t-1) -2t + 4t^2 \right) (2+i6)\,dt \\
&= -\dfrac{28}{3} + 12i.
\end{align}
By the way, $dz_1 = (2+6i)dt$. The second integral is:
\begin{align}
\int_{C_2} \left[z - \dfrac{z + \bar z}{2} + \left(\dfrac{z + \bar z}{2} \right)^2 \right] \,dz \\ &= \int_0^1 \left(2 -2t + 5i -(2-2t) + (2-2t)^2 \right) (-2)\,dt \\
&= -\dfrac{8}{3} - 10i.
\end{align}
By the way, $dz_2 = -2 dt$. Therefore, the result is $-12 +2i$.