I read the following in the book, Kumar's Algebra, Page 144:
If $f(x)$ and $g(x)$ have common roots $\alpha, \beta, \gamma, \ldots$, then the polynomial whose roots are $\alpha, \beta, \gamma, \ldots$ is given by $h(x) = af(x) + bg(x)$.
I don't understand what $a$ and $b$ are in the last line. Are they some suitable coefficients that must be used for the above condition to be true? Can they be computed algorithmically?
I don't know if it's written that way in your text-book, but I'd say that the way you wrote the statement is vague and very misleading.
First, the word "the" is inappropriate, because it implies that there is only one polynomial that has the same roots as $f$ and $g$, whereas in fact there are many. In particular, if $a$ and $b$ are any numbers whatsoever, then the polynomial $h = af+bg$ has the same roots as $f$ and $g$. If $f(\alpha)=0$ and $g(\alpha)=0$, then clearly $h(\alpha) = 0$, too, so all common roots of $f$ and $g$ are roots of $h$.