Prove that $A_{5 \times 5}$ is a diagonalizable if $\operatorname{rank}(I+A)=\operatorname{rank}(2I-A)=3$ and $\det A=12$.
Because $\operatorname{rank}(I+A)=\operatorname{rank}(2I-A)<5$ then: $$ \det (I+A)=\det (2I-A)=0 $$ therefore there're two eigenvalues: $t_1=-1, t_2=2$.
We know that geometric multiplicity of $I+A$ is $n-\operatorname{rank}(I+A)=2$ likewise for $2I-A$.
Because the algebraic multiplicity is greater than or equal to the geometric and $\deg p(t)=5$, the characteristic polynomial is: $$ p(t)=(t+1)^2(t-2)^2(t-x) $$
Because $\det A=12$ this means that the free variable of $p(t)$ is $-12$.
I understand everything up until this point: because the free variable is $-12$ then: $$ 1\cdot 2^2\cdot (-x)=-12 \Rightarrow x=3 \quad (\ast) $$ How do we get the equation $(\ast)$?
Hint : You already know the free variable of the polynomial $p(t)$. What is the free variable of $(t+1)^2(t-2)^2(t-x)$?