Problem: If two matrices are similar, then they have the same Jordan canonical form (up to the ordering of the Jordan blocks).
Proof sketch I'm trying to follow: If $A$ and $B$ are similar, then they have the same minimal polynomial $p_1^{e_1}p_2^{e_2}\cdots p_m^{e_m}$. Treating $B$ as a linear operator on $V$, then $B$ has a primary decomposition $$V=V_1 \oplus \cdots \oplus V_n$$
where $V_i = ker(p_i(B)^{e_i})$.
If $A = PBP^{-1}$, then $P\left(V_1\right) \oplus \ldots \oplus P\left(V_n\right)$ is the primary decomposition for $A$. If $V_i$ corresponds to the prime polynomial $\left(x-\lambda_i\right)$ and $V_i=W_1 \oplus \ldots \oplus W_k$ is a decomposition into cyclic invariant subspaces for $B-\lambda_i I$, then $P\left(V_i\right)=P\left(W_1\right) \oplus \ldots \oplus P\left(W_k\right)$ is a decomposition of $P\left(V_i\right)$ into cyclic invariant subspaces for $A-\lambda_i I$. Then $A$ and $B$ have the same Jordan canonical form.
Question: How do I go from $A = PBP^{-1}$ to $P\left(V_1\right) \oplus \ldots \oplus P\left(V_n\right)$ being the primary decomposition for $A$?