Suppose $A,B$ are $3\times 3$ matrices with minimal polynomials $x^2-4$ and $x+2$ resp. What are the possible dimensions of the kernel of $A-B$?
The possible JCFs for $A$ are $(2,2,-2), (2,-2,-2)$. The JCF of $B$ is $(-2,-2,-2)$. Thus the possible JCFs for $A-B$ are $(4,4,0),(4,0,0)$, and the possible dimensions are $1$ or $2$. (They are invariant under conjugation.)
Is this a correct sketch of solution?
t about the JCFs of $A$ and $B$. However your answer seems to imply that JCFs can be subtracted. The canonical form is obtained in a particular basis, and there is no reason it should be the same basis for both. However, it does work here because $ B $ is a scalar matrix given that it's minimal polynomial has degree $1 $. Therefore it commutes with any other matrix and will stay the same under change of bases.
Hence your conclusion is correct.