We are give $BA=AB$.We will post-multiply this by $A^{-1}$
=$BAA^{-1}=ABA^{-1}$
= $B=ABA^{-1}$ [$AA^{-1}=I$]
Now, we will pre-mutliply the equation with $A^{-1}$
= $A^{-1}B=A^{-1}ABA^{-1}$
=$A^{-1}B=BA^{-1}$
Adding $A^{-1}A$ both sides -
=$A^{-1}B+A^{-1}A=BA^{-1}+AA^{-1}$
=$A^{-1}\left(B+A\right)=\left(B+A\right)A^{-1}$
Taking the inverse on both sides [$(AB)^{-1}=B^{-1}A^{-1}$]
=$\left(A+B\right)^{-1}A=A\left(A+B\right)^{-1}\rightarrow1$
Similarly, we will get =$\left(A+B\right)^{-1}B=B\left(A+B\right)^{-1}\rightarrow2$
Now, we need to find the value of$2A — B — A(A + B)^{−1}A + B(A + B)^{−1}B$
Substituting the value of$\left(A+B\right)^{-1}A=A\left(A+B\right)^{-1}$ from eq. 1, and the value of$\left(A+B\right)^{-1}B=B\left(A+B\right)^{-1}$ from eq. 2 -
=$2A—B—AA(A+B)^{−1}+BB(A+B)^{−1}$
=$2A—B—A^2(A+B)^{−1}+B^2(A+B)^{−1}$
=$2A—B—(A+B)^{−1}\left(A^2-B^2\right)$
Now, $(A+B)(A-B)=A^2+AB-BA-B^2$, and since $AB=BA$, thus$(A+B)(A-B)=A^2-B^2$
=$2A—B—(A+B)^{−1}\left(A+B\right)\left(A-B\right)$
=$2A—B—\left(A-B\right)$ [$(A+B)(A+B)^{-1}=I$]
=$2A—B—A+B$
=$A$