I am trying to prove the following result. So far my only idea was to try using the formula for inversion of block matrices, but that did not get me very far. Any help will be much appreciated.
Setup
Suppose $\mathbf{A}$ and $\mathbf{B}$ are $n \times m$ and $m \times n$ matrices respectively, with $n<m$ and
$$\operatorname{rank}(\mathbf{A})=\operatorname{rank}(\mathbf{B})=n.$$
For some $p \lt m$ and $\gamma \in \mathbb{R}$, let $\mathbf{\Gamma}$ be an $m \times m$ diagonal matrix with
$$\mathbf{\Gamma}_{i,i}=1, \; \text{ if} \;\; i \le p, \;\;\;\;\; \text{ and } \;\;\;\;\; \mathbf{\Gamma}_{i,i}=\gamma, \; \text{ if }\;\; i \gt p.$$
Consider the matrices $\mathbf{M}$ and $\mathbf{N}$ given by
$$\mathbf{M} = \; \mathbf{B}(\mathbf{A}\mathbf{B})^{-1}\mathbf{A}, \;\;\;\;\;\; \text{and} \;\;\;\;\;\; \mathbf{N} = \; \mathbf{\Gamma B}(\mathbf{A \Gamma}^2 \mathbf{B})^{-1}\mathbf{A \Gamma}. $$
Finally, for any matrix $\mathbf{M}$, let $\mathbf{M_{p}}$ be the matrix made up of only the the first $p$ rows and $p$ columns of $\mathbf{M}$.
Conjecture
$$ \mathbf{M_{p}}(\mathbf{I_{p}}-\mathbf{N_{p}})= \gamma^2 (\mathbf{I_{p}}-\mathbf{M_{p}})\mathbf{N_{p}} $$
where $\mathbf{I_{p}}$ stands for the identity matrix of size $p$.
Matlab Code
Here is a simple Matlab code that allows you to test the conjecture for random matrices:
n = 3;
m = 7;
p = 4;
lb = -1;
ub = 1;
A = unifrnd(lb,ub,n,m);
B = unifrnd(lb,ub,m,n);
g = unifrnd(lb,ub,1,1);
G = eye(m).*[ones(p,m);ones(m-p,p),ones(m-p,m-p)*g];
M = (B/(A*B))*A;
N = (G*B/(A*G*G*B))*A*G;
disp(M(1:p,1:p)*(eye(p)-N(1:p,1:p))./(g^2*(eye(p)-M(1:p,1:p))*N(1:p,1:p)))
It should return a $p \times p$ matrix with only ones to verify the conjecture.
I'm not sure if there is any elegant solution, but your conjecture can be easily proved by a continuity argument. Let $A=\pmatrix{X&Y}$ and $B=\pmatrix{Z\\ W}$, where $X$ and $Z$ are $n\times n$. Suppose that $X$ and $Z$ are invertible. Then the followings are equivalent: (for convenience, I write $g$ instead of $\gamma$) \begin{align} M_p(I_p-N_p)&=g^2(I_p-M_p)N_p,\tag{1}\\ Z(XZ+YW)^{-1}X [ I - Z(XZ+g^2YW)^{-1}X ] &= g^2 [ I - Z(XZ+YW)^{-1}X ] Z(XZ+g^2YW)^{-1}X,\\ (XZ+YW)^{-1}X [ I - Z(XZ+g^2YW)^{-1}X ] &= g^2 [ I - (XZ+YW)^{-1}XZ ] (XZ+g^2YW)^{-1}X,\\ (XZ+YW)^{-1} [ I - XZ(XZ+g^2YW)^{-1} ] &= g^2 [ I - (XZ+YW)^{-1}XZ ] (XZ+g^2YW)^{-1},\\ [ I - XZ(XZ+g^2YW)^{-1} ] &= g^2 YW (XZ+g^2YW)^{-1},\\ [ (XZ+g^2YW) - XZ ] &= g^2 YW,\\ g^2YW&=g^2YW. \end{align} Hence $(1)$ is also true for general $X,Z$.