$$ X = \begin{pmatrix} 1+b_1 & 1 & 0 & 0 & 0 & \frac{1}{a_{6}} \\ 1+b_2 & 1 & 1 & 0 & 0 & -\frac{a_1}{a_6} \\ b_3 & 1 & 1 & 1 & 0 & -\frac{a_2}{a_6} \\ b_4 & 0 & 1 & 1 & 1 & -\frac{a_3}{a_6} \\ b_5 & 0 & 0 & 1 & 1 & 1-\frac{a_4}{a_6} \\ b_6 & 0 & 0 & 0 & 1 & 1-\frac{a_5}{a_6} \end{pmatrix}$$
The Schur complement w.r.t. the first and last row/column gives
$$S = \begin{pmatrix} 1+b_1 & \frac{1}{a_6}\\ b_6 & 1 - \frac{a_5}{a_6} \end{pmatrix} -\begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 0 & 0 &1 \end{pmatrix} \begin{pmatrix} 1 & 1 & 0 & 0\\ 1 & 1 & 1 & 0\\ 0 &1 &1&1\\0&0&1&1 \end{pmatrix}^{-1} \begin{pmatrix}1+b_2 & -\frac{a_1}{a_6} \\ b_3 & -\frac{a_2}{a_6}\\ b_4 & -\frac{a_3}{a_6}\\ b_5 & 1-\frac{a_4}{a_6}\end{pmatrix}.$$
$$S = \begin{pmatrix} b_1 - b_2 + b_4 - b_5 & - \frac{-1-a_1+a_3-a_4+a_6}{a_6}\\-1-b_2+b_3-b_5+b_6 & \frac{a_1-a_2 + a_4 - a_5}{a_6}\end{pmatrix}$$
Then $\det(X) = \det\Biggr(\begin{pmatrix} 1 & 1 & 0 & 0\\ 1 & 1 & 1 & 0\\ 0 &1 &1&1\\0&0&1&1 \end{pmatrix}\Biggl). \det(S)$.
How matrix $S$ is obtained? I am not sure why and how to take the blocks here. How $S$ is derived? I can see that in matrix $M$ but how to approach it in matrix $X$?
Suppose $M = \begin{pmatrix} A & B \\ C & D\end{pmatrix}$. The Schur complement of $D $ w.r.t $M$ is given by $M/D = A - B D^{-1} C$. It is easy to see when there are contiguous blocks. But when they are not contiguous, how we apply the formula? Like how we get matrix $S$. But I am not sure how to connect this with matrix $X$.
How matrix $X$ will be different from $Y$ below, by clubbing the blocks together the blocks used to construct matrix $S$.
$$ Y = \begin{pmatrix} 1+b_1 & \frac{1}{a_6} & 1 & 0 & 0 & 0 \\ b_6 & 1-\frac{a_5}{a_6} & 0 & 0 & 0 & 1 \\ 1+b_2 & -\frac{a_1}{a_6} & 1 & 1 & 0 & 0 \\ b_3 & -\frac{a_2}{a_6} & 1 & 1 & 1 & 0 \\ b_4 & -\frac{a_3}{a_6} & 0 & 1 & 1 & 1\\ b_6 & 1-\frac{a_4}{a_6} & 0 & 0 & 1 & 1 \end{pmatrix}$$
The blocks in the Schur complement need not be contiguous. In your case, the diagonal blocks corresponds to the submatrices
$$\begin{aligned} A &=\begin{bmatrix}X_{11} & X_{1n} \\ X_{n1} & X_{nn}\end{bmatrix} =\begin{bmatrix}1+b_1 & \frac{1}{a_6} \\ b_6& 1 - \frac{a_5}{a_6}\end{bmatrix} \\ D&=\begin{bmatrix}X_{2,2} & ⋯ & X_{2,n-1} \\ ⋮&&⋮\\ X_{n-1,2} & ⋯& X_{n-1,n-1}\end{bmatrix} = \begin{bmatrix} 1 & 1 & 0 & 0\\ 1 & 1 & 1 & 0\\ 0 &1 &1&1\\0&0&1&1 \end{bmatrix} \end{aligned}$$
This is justified as follows: Consider the matrix $M' = P^⊤MP$ obtained by permuting both the rows and columns of a $n×n$ matrix $M$ by some permutation matrix $P∈ℙ_n$. We can compute the Schur complement of a contiguous block partition of $M'$:
$$\begin{aligned} M' &=\begin{bmatrix}A&B\\C&D\end{bmatrix} =\begin{bmatrix}I_{p}&BD^{-1}\\0&I_{q}\end{bmatrix} \begin{bmatrix}A-BD^{-1}C&0\\0&D\end{bmatrix} \begin{bmatrix}I_{p}&0\\D^{-1}C&I_{q}\end{bmatrix}. \end{aligned}$$
But since $\det(M') = \det(P^⊤ M P) = \det(M)$ we have
$$ \det(M) = \det(D) ⋅ \det(\underbrace{A-BD^{-1}C}_{=M'/D =S})$$
In your case, $P$ is the permutation matrix corresponding to the cycle $π=(2…n)$. And the size of the diagonal blocks is $2×2$ and $(n-2)×(n-2)$ respectively.