This is not so easy. The problem here is, that matrices are not commutative. You could define a non-commutative algebra and write a solver for this algebra. But let's try something simpler. If I am allowed to speculate a bit, we may try to generalize the "general" method of solving linear equations. Toward this aim, let's assume that our variables are now matrices and that the equations in this variables are linear.
We formally still have: m.x=y where m is now a matrix of matrices, x is a vector of matrices as is y. Formally, we must search the left inverse of m. We may formally do this using MMA. As an example, with 4 square matrices e that create a "super" matrix m:
m = Array[Subscript[e, #1, #2] &, {2, 2}];
Inverse[m]

But note that we have products in the denominator, what may be wrong because MMA does not pay attention to non commutativity. So we need to take care of order.Toward this aim, I use two different names for the elements of m: a for the elements of the matrix we want to invert and e for the original matrix , it is the same matrix but we want to make the order visible. The invert times the matrix must give the unit matrix of matrices:
ma = Array[Subscript[a1, #1, #2] &, {2, 2}];
im = Inverse[ma];
MatrixForm[im.m]

This should now be the unit matrix of matrices. Therefore we have the following equations:

Remember, 0 is a zero matrix and 1 is a unit matrix and a are the same elements as e. From the first 2 equations we see, that e12 (what is the same as a12) must commute with e22 and e21 must commute with e11. Otherwise the inverse is not defined. Further the 4. equation is the commuted 3. quation. This implies that e11 commutes with e22 and e12 commutes with e21. And this in addition tells as that "coef", the determinant of m, can be calculated without any order problem.
The result of this is: Provided that matrices e12 and e22, e21 and e11, e11 and e22, e12 and e21 commute then we can calculate x from above by:

where "⊗" means that the left expression (a simple matrix) multiplies each of the matrices e11,e12,e21,e22 from the left.
IdentityMatrix[3]
. $\endgroup$