New question $\rightarrow$ new answer. If $\alpha$, $\beta$ are the roots of $X^2+a X+ b$ then a polynomial expression $P(\alpha, \beta)$ can be reduced to a linear expression in $\alpha$ and $\beta$: First eliminate powers of $\alpha \beta = b$ from each monomial. Then use the technique from my other answer to reduce the remaining powers of $\alpha$ and $\beta$. This results in $$P(\alpha, \beta) = c_0 + c_1\alpha + c_2\beta$$ for some coefficients $c_0, c_1, c_2$. The quadratic for $P(\alpha, \beta)$ becomes $$(X-c_0)^2+a(c_1+c_2)(X-c_0) +a^2 c_1 c_2+b\, (c_1-c_2)^2.$$
Alternatively use Gröbner basis reduction on the ideal $$\langle X+Y+a, XY-b, P(X,Y)-Z \rangle$$ with $Z < X \wedge Y$ in the monomial order to find a quadratic equation in $Z$ alone. As an example consider $X^2-X-1$ and $P(\alpha, \beta) = 2\alpha + \beta$. Since this is already linear the formula above results in the following quadratic for $P(\alpha, \beta)$:
$$X^2-3X+1.$$
The same result using Gröbner basis reduction can be found here.