Show that the Lorentz boosts, $\begin{pmatrix}\gamma & -\beta\gamma\\ -\beta\gamma & \gamma\end{pmatrix}$ form a one-parameter Lie group. In the following post, I am questioning certain parts of the author's solution for the beginning of a proof that the Lorentz boosts form a one-parameter Lie group:

Show that the Lorentz boosts,
\begin{pmatrix}\gamma & -\beta\gamma\\  -\beta\gamma & \gamma\end{pmatrix} form a one-parameter Lie group. Is this group Abelian?

Here is the author's solution:

The Lorentz boosts, $\Lambda$, are defined by
$$\Lambda(\beta)=\begin{pmatrix}\gamma & -\beta\gamma\\  -\beta\gamma & \gamma\end{pmatrix}=\gamma(\beta)\begin{pmatrix}1 & -\beta\\  -\beta & 1\end{pmatrix}$$ where $\gamma(\beta)=\frac{1}{\sqrt{1-{\beta}^2}},\quad \beta=\frac{v}{c}, \quad$
and $c$ is the speed of light, so $\lvert v \rvert\lt c$. To show that these matrices form a Lie group, we must demonstrate that these matrices under matrix multiplication satisfy the group axioms.
Closure. The product of two boosts $\Lambda(\beta )$ and $\Lambda({\beta}^{\prime})$ is
$$\begin{align}\Lambda(\beta )\Lambda({\beta}^{\prime})&=\gamma({\beta})\gamma({\beta}^{\prime})\begin{pmatrix}1 & -\beta\\  -\beta & 1\end{pmatrix}\begin{pmatrix}1 & -{\beta}^\prime\\  -{\beta}^\prime & 1\end{pmatrix}\\&=\gamma({\beta})\gamma({\beta}^{\prime})\begin{pmatrix}1+\beta{\beta}^\prime & -\beta-{\beta}^\prime\\  -\beta-{\beta}^\prime & 1+\beta{\beta}^\prime\end{pmatrix}\end{align}$$
For this product to have the form $$\Lambda(\beta^{\prime\prime})=\gamma(\beta^{\prime\prime})\begin{pmatrix}1 & -{\beta}^{\prime\prime}\\  -{\beta}^{\prime\prime} & 1\end{pmatrix}\tag{1}$$ we must require that $$\color{red}{\gamma(\beta^{\prime\prime})=\gamma(\beta)\gamma({\beta}^\prime)\left(1+\beta{\beta}^\prime\right)}\tag{2}$$
$${\begin{align}\color{red}{{\beta}^{\prime\prime}\gamma({\beta}^{\prime\prime})=\gamma(\beta)\gamma({\beta}^\prime)\left(\beta+{\beta}^\prime\right)}\tag{3}&\\=[\cdots]\end{align}}$$


I would like to understand the reasoning behind the need for the red equations, $(2)$ and $(3)$.
Taking equation $(2)$ for now, and plugging it back into $(1)$,
$$\begin{align}\Lambda(\beta^{\prime\prime})&=\gamma(\beta^{\prime\prime})\begin{pmatrix}1 & -{\beta}^{\prime\prime}\\  -{\beta}^{\prime\prime} & 1\end{pmatrix}\\&=\gamma(\beta)\gamma({\beta}^\prime)\left(1+\beta{\beta}^\prime\right)\begin{pmatrix}1 & -{\beta}^{\prime\prime}\\  -{\beta}^{\prime\prime} & 1\end{pmatrix}\\&=\gamma(\beta)\gamma({\beta}^\prime)\begin{pmatrix}1 +\beta{\beta}^\prime & -\left(1 +\beta{\beta}^\prime\right){\beta}^{\prime\prime}\\  -\left(1 +\beta{\beta}^\prime\right){\beta}^{\prime\prime} & 1 +\beta{\beta}^\prime\end{pmatrix}\\&=\gamma(\beta)\gamma({\beta}^\prime)\left(1+\beta{\beta}^\prime\right)\begin{pmatrix}1 & -{\beta}^{\prime\prime}\\  -{\beta}^{\prime\prime} & 1\end{pmatrix}\end{align}$$
So I see why the factor of $\color{red}{\left(1+\beta{\beta}^\prime\right)}$ was needed in equation $(2)$, but there was no way I could intuit the need for this $\color{red}{\left(1+\beta{\beta}^\prime\right)}$ factor without direct substitution as I did above. Is there some deeper technique going on here that eludes me, like matrix diagonalization?
The other equation (in red) I am questioning is $(3)$ and I really don't understand what the author is trying to do with this. So, if anyone has any insights or thought's on why this is being done please let me know.

N.B.
There is more to equation $(3)$ than I have written above, but I didn't want to ask too many questions at once, so for now I am just questioning the need for $\color{red}{{\beta}^{\prime\prime}\gamma({\beta}^{\prime\prime})=\gamma(\beta)\gamma({\beta}^\prime)\left(\beta+{\beta}^\prime\right)}$.
 A: Set the components of the matrix equal to one another.
On one hand, the product of the two boosts is equal to:
$$\begin{bmatrix}\gamma_1 \gamma_2 (1+\beta_1\beta_2) & - \gamma_1\gamma_2 (\beta_1 + \beta_2) \\ - \gamma_1\gamma_2 (\beta_1 + \beta_2) & \gamma_1 \gamma_2 (1+\beta_1\beta_2)\end{bmatrix}$$
on the other hand, for closure, you want this product to have the form of a boost for some unknown value of $\beta_3$ and $\gamma_3(\beta_3)$:
$$\begin{bmatrix}\gamma_3 & -\gamma_3 \beta_3 \\ -\gamma_3\beta_3 & \gamma_3\end{bmatrix}$$
Setting these two matrices equal to one another, you find constraints on $\gamma_3$ and $\beta_3$:
$$\gamma_3 = \gamma_1\gamma_2(1+\beta_1\beta_2)\\ -\gamma_3\beta_3 = -\gamma_1\gamma_2(\beta_1+\beta_2) \\ \Rightarrow \beta_3 = \frac{\beta_1+\beta_2}{1+\beta_1\beta_2}$$
So you can solve for $\gamma_3$ and $\beta_3$ in terms of the original parameters $\beta_1,\beta_2,\gamma_1,\gamma_2$ and show that $\gamma_3$ is indeed the Lorenz factor corresponding to $\beta_3$, i.e. you can prove that, as required, $$\gamma_3 = \frac{1}{\sqrt{1-\beta_3^2}}$$
so the product of two boosts is itself a boost corresponding to $\beta_3,\gamma_3$.
