Using these, we express the given expression in terms of only $A$ and $P$.
On one hand, we have
\[A(A+B)^{-1}B=AP^{-1}(P-A)=AP^{-1}P-AP^{-1}A=A-AP^{-1}A.\]
On the other hand we have
\[B(A+B)^{-1}A=(P-A)P^{-1}A=PP^{-1}A-AP^{-1}A=A-AP^{-1}A.\]
Thus these are equal.

This completes the proof.

Comment.

Did I make a mistake? Isn’t it too simple to be a qualifying exam problem?

A Matrix Having One Positive Eigenvalue and One Negative Eigenvalue
Prove that the matrix
\[A=\begin{bmatrix}
1 & 1.00001 & 1 \\
1.00001 &1 &1.00001 \\
1 & 1.00001 & 1
\end{bmatrix}\]
has one positive eigenvalue and one negative eigenvalue.
(University of California, Berkeley Qualifying Exam Problem)
Solution.
Let us put […]

A Matrix Equation of a Symmetric Matrix and the Limit of its Solution
Let $A$ be a real symmetric $n\times n$ matrix with $0$ as a simple eigenvalue (that is, the algebraic multiplicity of the eigenvalue $0$ is $1$), and let us fix a vector $\mathbf{v}\in \R^n$.
(a) Prove that for sufficiently small positive real $\epsilon$, the equation […]

If Column Vectors Form Orthonormal set, is Row Vectors Form Orthonormal Set?
Suppose that $A$ is a real $n\times n$ matrix.
(a) Is it true that $A$ must commute with its transpose?
(b) Suppose that the columns of $A$ (considered as vectors) form an orthonormal set.
Is it true that the rows of $A$ must also form an orthonormal set?
(University of […]

Inequality Regarding Ranks of Matrices
Let $A$ be an $n \times n$ matrix over a field $K$. Prove that
\[\rk(A^2)-\rk(A^3)\leq \rk(A)-\rk(A^2),\]
where $\rk(B)$ denotes the rank of a matrix $B$.
(University of California, Berkeley, Qualifying Exam)
Hint.
Regard the matrix as a linear transformation $A: […]

Find the Rank of the Matrix $A+I$ if Eigenvalues of $A$ are $1, 2, 3, 4, 5$
Let $A$ be an $n$ by $n$ matrix with entries in complex numbers $\C$. Its only eigenvalues are $1,2,3,4,5$, possibly with multiplicities. What is the rank of the matrix $A+I_n$, where $I_n$ is the identity $n$ by $n$ matrix.
(UCB-University of California, Berkeley, […]

Prove that the Length $\|A^n\mathbf{v}\|$ is As Small As We Like.
Consider the matrix
\[A=\begin{bmatrix}
3/2 & 2\\
-1& -3/2
\end{bmatrix} \in M_{2\times 2}(\R).\]
(a) Find the eigenvalues and corresponding eigenvectors of $A$.
(b) Show that for $\mathbf{v}=\begin{bmatrix}
1 \\
0
\end{bmatrix}\in \R^2$, we can choose […]

Square Root of an Upper Triangular Matrix. How Many Square Roots Exist?
Find a square root of the matrix
\[A=\begin{bmatrix}
1 & 3 & -3 \\
0 &4 &5 \\
0 & 0 & 9
\end{bmatrix}.\]
How many square roots does this matrix have?
(University of California, Berkeley Qualifying Exam)
Proof.
We will find all matrices $B$ such that […]

Linear Dependent/Independent Vectors of Polynomials
Let $p_1(x), p_2(x), p_3(x), p_4(x)$ be (real) polynomials of degree at most $3$. Which (if any) of the following two conditions is sufficient for the conclusion that these polynomials are linearly dependent?
(a) At $1$ each of the polynomials has the value $0$. Namely $p_i(1)=0$ […]