Can the given transformation possible for given determinant? 
In forth step $(x-1)(x-2)$ is obtained by applying transformation R$1 \frac{1}{(x+1)}$  and R$2 \frac{1}{(x+2)}$. 
But we get value of $x = -1$ or $ x = -2$ so $\frac{1}{(x+1)}$ and $\frac{1}{(x+2)}$  will be undefined because value of x can be -1 and -2. 
So my question is can we apply R1i and R2i?

In Step four, $(x+1) , (x+2)$ is obtained not by applying transformation $R_{1\frac{1}{x+1}}$ and $R_{2\frac{1}{x+2}}$. Since determinant function is linear in each row, we have 
\begin{align}det
\begin{bmatrix}
c.a_{1,1} & c.a_{1,2} & c.a_{1,3}\\
a_{2,1} & a_{2,2} & a_{2,3}\\
a_{3,1} & a_{3,2} & a_{3,3}
\end{bmatrix} = c .det
\begin{bmatrix}
a_{1,1} & a_{1,2} & a_{1,3}\\
a_{2,1} & a_{2,2} & a_{2,3}\\
a_{3,1} & a_{3,2} & a_{3,3}
\end{bmatrix}
\end{align}
Above identity is true for every row not just first row.
Hence we have the step four using the linearity of determinant in first and third row.
