We establish the formulas of the maximal rank of a $3\times 3$ partial banded block matrix $$ \left(\matrix{M_{11}&M_{12}&X\\M_{21}&Y&M_{23}\\Z&M_{32}&M_{33}}\right) $$ where $X$, $Y$, and $Z$ are three variant quaternion matrices subject to linear matrix equations $A_1X=C_1$, $XB_1=C_2$, $A_2Y=D_1$, $YB_2=D_2$, $A_3Z=E_1$, $ZB_3=E_2$. In order to demonstrate the feasibility of the result obtained, we present a necessary and sufficient condition for the solvability to the cubic system $A_1X=C_1$, $XB_1=C_2$, $A_2Y=D_1$, $YB_2=D_2$, $A_3Z=E_1$ $ZB_3=E_2$, $XYZ=J$ over the quaternion algebra.