For a given linear matrix function $A_1 – B_1XB^*_1$, where $X$ is a variable Hermitian matrix, this paper derives a group of closed-form formulas for calculating the global maximum and minimum ranks and inertias of the matrix function subject to a pair of consistent matrix equations $B_2XB^*_2 = A_2$ and $B_3XB_3^* = A_3$. As applications, we give necessary and sufficient conditions for the triple matrix equations $B_1XB^*_1 =A_1$, $B_2XB^*_2 = A_2$ and $B_3XB^*_3 = A_3$ to have a common Hermitian solution. In addition, we discuss the global optimizations on the rank and inertia of the common Hermitian solution of the pair of matrix equations $B_2XB^*_2 = A_2$ and $B_3XB^*_3 = A_3$.