There are several ways to factorise this quadratic expression, but the best way in my opinon is:
Take the constant in front of the x^2 and multiply it by the standalone constant (i.e. multiply 2 by 21, which gives 42). The constant in front of x is 17. This tells us that we need to find 2 numbers whose product is 42 and sum is 17.
After trail and error, we know that these two numbers will be 14 and 3. Hence, the middle term (17x) will be split into these two terms (i.e. 13x and 4x), giving us 2x^2 + 14x + 3x + 21 .
Factorising these individually gives us: 2x(x+7) + 3(x+7) and final answer comes to (2x + 3) ( x + 7)