We introduce a simultaneous decomposition for a matrix triplet (A,B,C
*), where A=±A
* and (·)* denotes the conjugate transpose of a matrix, and use the simultaneous decomposition to solve some conjectures on the maximal and minimal values of the ranks of the matrix expressions A-BXC±(BXC)* with respect to a variable matrix X. In addition, we give some explicit formulas for the maximal and minimal values of the inertia of the matrix expression A-BXC-(BXC)* with respect to X. As applications, we derive the extremal ranks and inertias of the matrix expression D-CXC
* subject to Hermitian solutions of a consistent matrix equation AXA
*=B, as well as the extremal ranks and inertias of the Hermitian Schur complement D-B
*
A
∼
B with respect to a Hermitian generalized inverse A
∼ of A. Various consequences of these extremal ranks and inertias are also presented in the paper.