The problem: For which values of parameter $a$ the functions $f(x)$ and $g(x)$ have at least $1$ common root.
$f(x)=x^2+ax+1=0$
$g(x)=x^2+x+a=0$
What i did was look at the 2 functions separately and find the roots then equal them and i get the answer.
My question: I am looking for a better way because if the functions were more difficult this method won't be practical.

Suppose $x$ is the common root:
$$ \begin{cases} \begin{align} x^2 + ax + 1 = 0 \\ x^2+x+a=0 \end{align} \end{cases} $$
Subtracting the equations gives:
$$\require{cancel} \cancel{x^2} + ax + 1 - (\cancel{x^2}+x+a) = 0 \quad\iff\quad (x-1)(a-1)=0 $$
Then:
either $\,a=1\,$ in which case the equations are in fact identical;
or $\,x=1\,$ is the common root which, after substituting back in either equation, gives $a=-2\,$.