We know that $\forall \lambda_i$, $m_g(\lambda_i)$ is equal to the number of Jordan blocks relative to the eigenvalue $\lambda_i$, while the powers that appear in the minimal polynomial represent the biggest Jordan block relative to a specific eigenvalue $\lambda_k$.
The algebraic multiplicity $m_a(\lambda_i)$ is equal to the sum of the orders of the blocks relative to the eigenvalue $\lambda_i$.
We have $$\chi(t)=(t-3)^4(t+2)^5(t-5)^2, \mu(t)=(t-3)^2(t+2)^3(t-5)$$ $$\text{and }m_g(3)=2,m_g(-2)=3.$$ The informations that we know are that the sum of the orders of the Jordan blocks relative to the eigenvalue $3$ is $4$ and the biggest block has dimension $2$.
The sum of the orders of the Jordan blocks relative to $-2$ is $5$ and the biggest of them has dimension $3$.
Finally, we have that the sum of Jordan blocks relative to $5$ is $2$ and the biggest of them has order $1$.
The possibilities that we have are: $$J_3\to\begin{cases}(\textbf{J}_\textbf{3,2},J_{3,2})\\(\textbf{J}_\textbf{3,2}J_{3,1},J_{3,1})\text{ not acceptable} \end{cases}$$ $$ J_{-2}\to\begin{cases}(\textbf{J}_\textbf{-2,3},J_{-2,2})\text{ not acceptable}\\(\textbf{J}_\textbf{-2,3},J_{-2,1},J_{-2,1}) \end{cases}$$ $$J_5\to (J_{5,1},J_{5,1})$$ In the notation "$J_{i,k}$", $i$ is the eigenvalue and $k$ is the dimension of the block.
The idea is that, after we fix the biggest block, we study the possible partitions of the number of the remaining blocks.