A study of (A, B) invariant subspaces via polynomial models