Computing invariant subspaces between two matrices

With respect to the paper below.
https://core.ac.uk/download/pdf/82384172.pdf. I am interested in computing the invariant subspace of the two matrices.

Any help in this regard