Could someone help me explain the algebra of these steps [closed]

Im confused on the algebraic steps of this simplification. Im looking for someone to explain how the ^2 got removed and how $(2k^2+7k+6)$ gets simplifed to $(k+1)(k+2)(2k+3)$ from the image below enter image description here


(This is a restatement of the comments, to help remove this Question from the Unanswered queue)

  • In the second line, $(k+1)$ appears as a factor of both terms in the numerator. It is then un-distributed and appears as the factor at the front of the numerator in the third line.

  • In the final step $2k^2+7k+6$ has been factored as $(k+2)(2k+3)$.