Solution (source code)

= Solution

Parametrize the straight segment by $x=1-t$, $y=t$, $0\le t\le1$. Then $dx=-dt$, $dy=dt$, and $x^2+xy=1-t$. The <line integral> is
$$
\begin{aligned}
I_1&=\int_0^1\left[-\alpha(1-t)+\beta((1-t)^2+t^2)\right]dt\\
&=\boxed{-\frac\alpha2+\frac{2\beta}{3}}.
\end{aligned}
$$