When we are factoring a quadratic function, we are trying to reverse the following equation
[tex](x+a)(x+b)=x^2+(a+b)x+ab[/tex]Now, comparing the right-hand side of the above equation and the one given in the problem we see that
[tex]\begin{gathered} a+b=-2 \\ ab=-15 \end{gathered}[/tex]This means the question simplifies to "what are the two numbers that if I add them I get -2 and if I multiply them I get -15? "
Well, If we set a = -5 and b = 3, then
[tex]\begin{gathered} -5+3=-2 \\ -5\cdot3=-15 \end{gathered}[/tex]Hence, our expression factors to
[tex](x-5)(x+3)[/tex]