Along the way of deriving the formula for a sum of integer squares on this webpage (it is about proving the pyramid volume formula), I noticed this step:
$$2n^2+7n+6=(n+2)(2n+3)$$
From right-to-left, you simply multiply the terms into each other's brackets.
But from left-to-right, as is done in the proof, I can't figure out the method.
Is there are formula for such factoring or is it simply a "good guess"?
The polynomial $2n^2+7n+6$ is a simple quadratic with discriminant $\Delta = 49-48=1$ and roots $\cfrac{-7 \pm \sqrt{1}}{4}=-2,-\frac{3}{2}\,$, therefore it is divisible by $(n+2)(n+\frac{3}{2})$. The dominant coefficient is $2\,$, so the full factorization is $\,2(n+2)(n+\frac{3}{2}) = (n+2)(2n+3)\,$.