Suppose $$A = \begin{pmatrix} 1+a_{1}+a_{1}b_{1}+b_{2} & 1+a_{1} & 1 & 0\\ a_{2}+a_{2}b_{1}+b_{3} & 1+a_{2} & 1 & 1\\ a_{3}+a_{3}b_{1} + b_{4} & a_{3} & 1 & 1\\ a_{4} + a_{4}b_{1} & a_{4} & 0 & 1\end{pmatrix}$$ Show that $$\det(A) = \det\begin{pmatrix} b_{1}-b_{2}+b_{4} & 1+a_{1}-a_{3}+a_{4}\\ -1-b_{2}+b_{3} & a_{1}-a_{2}+a_{4}\end{pmatrix}$$
I am not sure how to show this. I tried to perform some row and column operations but could simplify matrix $A$.
Note that for a general matrix of size $(3k+1)\times (3k+1)$, the determinant of $A$ can be written in a similar form. Say for a $7 \times 7$ matrix,
$$A_{7 \times 7} = \begin{pmatrix} 1+a_1+a_1b_1+b_2 & 1+a_1 & 1& 0 &0 &0 &0\\ a_2 + a_2b_1 + b_3 & 1+a_2 & 1 & 1&0&0&0\\ a_3+a_3b_1+b_4 & a_3 & 1 & 1 & 1& 0 &0\\ a_4+a_4b_1+b_5 & a_4 & 0 & 1 & 1&1 &0\\ a_5+a_5b_1+b_6 & a_5 & 0 & 0 & 1&1 &1\\ a_6+a_6b_1+b_7 & a_6 & 0 & 0 & 0&1 &1\\ a_7 + a_7b_1 & a_7 & 0 & 0 & 0&0 &1 \end{pmatrix}$$
$$\det(A) = \det\begin{pmatrix} b_{1}-b_{2}+b_{4}-b_{5}+b_{7} & 1+a_{1}-a_{3}+a_{4}-a_{6}+a_{7}\\ -1-b_{2}+b_{3}-b_{5}+b_{6} & a_{1}-a_{2}+a_{4}-a_{5}+a_{7}\end{pmatrix}$$
Any thoughts on how to show this in general?