On the equation AB= BX in collections of matrices