Factoring polynomials is analogous to factoring integers. For example, when you see $12-4$, this can be written as $4(3-1)$ since $4\cdot 3 = 12$ and $4\cdot -1 = -4$, and you recover the original expression $12-4$ (this is a good technique to check you answer, once you factor check by distributing to see that you recover the original expression). Now what allowed us to "factor-out" the $4$? It was because it was present in the factorization of both summands, the $12$ and the $-4$. Similarly, with an expression like $x^2+x$, we look for common things in each summand, i.e. an $x$ (treating the variable $x$ as we did with the integer $4$) and we have $x^2+x = x(x+1)$. Try this with your numerator and denominator.