Theory:

In this section, let us consider the relationships between $$p(x)$$, $$g(x)$$, $$q(x)$$ and $$r(x)$$.

By Euclid's division algorithm, $$p(x) = (g(x) \times q(x)) + r(x)$$.

For $$p(x)$$, $$g(x)$$, $$q(x)$$ and $$r(x)$$ to hold true, it should satisfy Euclid's division algorithm.

In other words, both the degrees of LHS and RHS should be equal.

Deg ($$r(x)$$) will never have the highest degree among $$p(x)$$, $$g(x)$$, $$q(x)$$ and $$r(x)$$.

Hence, for $$p(x)$$, $$g(x)$$, $$q(x)$$ and $$r(x)$$ to hold true, deg($$p(x)$$ $$=$$ deg($$g(x)$$)$$+$$ deg($$q(x)$$) $$+$$ Any (remainder).
Example:
Let us consider the example given below and check whether the given quotient could be a factor of the given dividend or not.

Dividend $$p(x)$$ $$=$$ $$x^7+ 5x^4 + x - 17$$

Quotient $$q(x)$$ $$=$$ $$x^2 + 5$$

Let the remainder be the $$r(x)$$ and the divisor be the $$g(x)$$.

Degree of the divisor is $$2$$.

By Euclid's division algorithm, $$p(x) = g(x) \times q(x) + r(x)$$.

deg$$(p(x))$$ $$=$$ $$7$$

deg$$(g(x))$$ $$=$$ $$2$$

deg$$(q(x))$$ $$=$$ $$5$$

We know that, deg$$(r(x))$$ is less than $$2$$.

deg($$p(x)$$ $$=$$ deg($$g(x)$$)$$+$$deg($$q(x)$$)

$$7$$ $$=$$ $$5$$ $$+$$ $$2$$

Thus, $$x^2 + 5$$ can be the quotient of the polynomial.