Are there any numbers with this? Or is this all purely hypothetical/theoretical?
Anywho... what you would do is you would take the B matrix, and then multiply it by the inverse of the X matrix to solve for A matrix. Seeing as it is sort a complicated process and rather awkward to put into words, I have a link that takes you to a great website that explains it better.
Matrix Inversion: Finding the Inverse of a Matrix
It is really a rather easy process. If you have questions, feel free to ask. I can break it down step by step if you wish.