$\textbf{Method 1 (Shortcut)}:$
Here, we do $3$ elementary row operations on the following coefficient matrix $A$ to get $U$ as:
$ A = \begin{pmatrix}
1 & 1 & -2 \\
1 & 3 & -1 \\
2 & 1 & -5
\end{pmatrix} \xrightarrow[]{\text{$R_2\leftarrow\boldsymbol{-1}R_1 + R_2 $}} \begin{pmatrix}
1 & 1 & -2 \\
0 & 2 & 1 \\
2 & 1 & -5
\end{pmatrix} \xrightarrow[]{\text{$R_3\leftarrow\boldsymbol{-2}R_1 + R_3 $}} \begin{pmatrix}
1 & 1 & -2 \\
0 & 2 & 1 \\
0 & -1 & -1
\end{pmatrix}$
$ \xrightarrow[]{\text{$R_3\leftarrow\boldsymbol{\frac{1}{2}}R_2 + R_3 $}} \begin{pmatrix}
1 & 1 & -2 \\
0 & 2 & 1 \\
0 & 0 & \frac{-1}{2}
\end{pmatrix}= \textbf{
U}
$
Now, to get $L,$ we just have to reverse the sign of the bold text which we have used in above row operations and put in that position of $L$ for which we have used the above row operations.
For Example, we have used $\boldsymbol{-1}R_1+R_2$ to make the position of second row and first column as zero. So, $L_{21} = 1.$ Similarly, $\boldsymbol{-2}R_1+R_3$ is used to make third row and first column as zero and so, $L_{31} = 2$ and $\boldsymbol{\frac{1}{2}}R_2+R_3$ is used to make third row and second column as zero and so, $L_{32} = \frac{-1}{2}.$ Since, diagonal elements of $U$ are not all $1s$ and hence, all diagonal elements of $L$ will be $1.$
Hence, $L = \begin{pmatrix}
1 & 0 & 0 \\
1 & 1 & 0 \\
2 & \frac{-1}{2} & 1
\end{pmatrix}$ and $ U = \begin{pmatrix}
1 & 1 & -2 \\
0 & 2 & 1 \\
0 & 0 & \frac{-1}{2}
\end{pmatrix}$
Therefore, $\textbf{(D)}$
If anyone wants to know why this works then reason lies in the third method below and you can see the results of $E_{21}^{-1},E_{31}^{-1},E_{32}^{-1}$ to know why it works.
$\textbf{Method 2:}$
$x_1 + x_2 -2x_3 = 4 \rightarrow(1)$
$x_1 + 3x_2 -x_3 = 7 \rightarrow(2)$
$2x_1 + x_2 -5x_3 = 7 \rightarrow(3)$
$2 eq(2) – eq(3)$ gives $5x_2 + 3x_3 = 7 $
$2 eq(1) – eq(3)$ gives $x_2 + x_3 = 1 \implies 5x_2 + 5x_3 = 5$
Solving $5x_2 + 3x_3 = 7 $ and $5x_2 + 5x_3 = 5$ gives $x_3=-1, x_2=2$ and by putting it in $eq(1),$ we get, $x_1=0$
So, $x_1=0,$ it means either option $(C)$ is correct or $(D)$
Now, we only need to find $U_{33}$ and get the answer for the given question.
To find $LU$ decomposition (if it is possible), we only need to convert the given matrix into $U$ by elementary row operations in Gaussian Elimination method (described at the end of the answer to find the complete solution for the given questions).
So, here, $A= \begin{bmatrix} 1 &1 &-2 \\ 1 &3 &-1 \\ 2 &1 &-5 \end{bmatrix}$
After $R_2 \leftarrow R_2 – R_1,$ $A$ becomes $\begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 2 &1 &-5 \end{bmatrix}$
After $R_3 \leftarrow R_3 – 2R_1,$ $A$ becomes $\begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 0 &-1 &-1 \end{bmatrix}$
After $R_3 \leftarrow R_3 +\frac{1}{2}R_2,$ $A$ becomes $\begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 0 &0 &\frac{-1}{2} \end{bmatrix}$
So, $U= \begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 0 &0 &\frac{-1}{2} \end{bmatrix}$
It means $U_{33} = \frac{-1}{2}$
Hence, $\textbf{Answer: D}$
$\textbf{Method 3:}$
Now, to find the complete solution for the given question, we can use this previous year question to find the $LU$ decomposition and then find $x_1$
After Applying $R_2 \leftarrow R_2 – R_1,$ $A$ becomes $\begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 2 &1 &-5 \end{bmatrix}$ and $E_{21}$ becomes $\begin{bmatrix} 1 &0 &0 \\ -1 &1 &0 \\ 0 &0 &1 \end{bmatrix}$
After Applying $R_3 \leftarrow R_3 – 2R_1,$ $A$ becomes $\begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 0 &-1 &-1 \end{bmatrix}$ and $E_{31}$ becomes $\begin{bmatrix} 1 &0 &0 \\ 0 &1 &0 \\ -2 &0 &1 \end{bmatrix}$
After Applying $R_3 \leftarrow R_3 + \frac{1}{2}R_2,$ $A$ becomes $\begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 0 &0 &\frac{-1}{2} \end{bmatrix}$ and $E_{32}$ becomes $\begin{bmatrix} 1 &0 &0 \\ 0 &1 &0 \\ 0 &\frac{1}{2} &1 \end{bmatrix}$
So, $U= \begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 0 &0 &\frac{-1}{2} \end{bmatrix}$
and $E_{32}E_{31}E_{21}(A) = U$
$A= E_{21}^{-1} E_{31}^{-1}E_{32}^{-1}U $
$A= \begin{bmatrix} 1 &0 &0 \\ 1 &1 &0 \\ 0 &0 &1 \end{bmatrix} \begin{bmatrix} 1 &0 &0 \\ 0 &1 &0 \\ 2 &0 &1 \end{bmatrix} \begin{bmatrix} 1 &0 &0 \\ 0 &1 &0 \\ 0 &\frac{-1}{2} &1 \end{bmatrix} U$
$A= \begin{bmatrix} 1 &0 &0 \\ 1 &1 &0 \\ 2 &\frac{-1}{2} &1 \end{bmatrix} U$
Hence, $L=\begin{bmatrix} 1 &0 &0 \\ 1 &1 &0 \\ 2 &\frac{-1}{2} &1 \end{bmatrix}$ and $U= \begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 0 &0 &\frac{-1}{2} \end{bmatrix}$
Now, to find $x_1,x_2,x_3,$ we can write:
$AX=B \implies LUX = B$
let $UX=Y, $ So, $LY=B$
we can write $LY=B$ in matrix notation as: $\begin{bmatrix} 1 &0 &0 \\ 1 &1 &0 \\ 2 &\frac{-1}{2} &1 \end{bmatrix}$$\begin{bmatrix} y_1\\y_2 \\ y_3 \end{bmatrix} = \begin{bmatrix} 4\\7 \\ 7 \end{bmatrix}$
So, $y_1=4,y_1+y_2=7 \implies y_2=3, 8 – \frac{3}{2} + y_3 = 7 \implies y_3=\frac{1}{2}$
So, $y_1=4, y_2=3,y_3=\frac{1}{2}$
Now, on solving $UX=Y$ i.e. $\begin{bmatrix} 1 &1 &-2 \\ 0 &2 &1 \\ 0 &0 &\frac{-1}{2} \end{bmatrix} \begin{bmatrix} x_1\\x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 4\\3 \\ \frac{1}{2} \end{bmatrix} $
It means $\frac{-x_3}{2}=\frac{1}{2} \implies x_3=-1, 2x_2-1=3 \implies x_2 =2, x_1+x_2-2x_3 = 4 \implies x_1+2+2=4\implies x_1=0$
Hence, $x_1=0,x_2=2,x_3=-1$