Jordan form and an invertible $P$ for $A =\left( \begin{smallmatrix} 1&1&1 \\ 0 & 2 & 2 \\ 0 & 0 & 2 \end{smallmatrix}\right)$ 
$A = \begin{pmatrix} 1&1&1 \\ 0 & 2 & 2 \\ 0 & 0 & 2 \end{pmatrix}$, find the jordan form and the invertible $P$ such that: $A = P J P^{-1}$.

Now I found the characteristic polynomial and minimal polynomials:
$P_A(x) = (x-1)(x-2)^2 = m_A(x)$.
And from the minimal polynomial I found out that the maximal block size for the eigenvalue $1$ is $1$ so we have one block of size $1$ for that eigenvalue. And in the same way that the maximal jordan block size for eigenvalue $2$ is $2$ and I calculated $N=A-2I$ and figured that there is only one block of size $2$ for eigenvalue $2$. And so I found the Jordan Form:
$$J_A = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 2 & 1 \\ 0 & 0 & 2 \end{pmatrix}$$
Now what I am having trouble with is finding $P$. I know that $Ker(N) = Ker(N-2I) = (1,1,0$ and $Ker(Z) = Ker(A-I) = (1,0,0)$ But how do I exactly calculate the spans to know the basis for the Jordan form if I have two eigenvalues? This is an algorithm that I was not taught!
Any help will be appreciated
 A: You have found an eigenvector corresponding to the eigenvalue $1$, call it $v_1$, and you have one eigenvector corresponding to $2$, call it $v_2$. Suppose the last vector of the basis is $v_3$. Then, from the last column of the Jordan form we have $Av_3=v_2+2v_3$, i.e. $(A-2I)v_3=v_2$. Just solve this system to get $v_3$ (i.e. $(A-2I)x=v_2$).
Edit: Suppose $B=(v_1,v_2,v_3)$ and $P=[I]^B_E$ where $E$ is the standard basis. Then $P^{-1}AP=J$. Denote by $C_i^J$ the $i$-th column of $J$. Since $J$ is the matrix representing (the operator defined by) $A$ w.r.t basis $B$, we have $C_i^J=[Av_i]_B$. In particular, $C_3^J=[Av_3]_B=(0,1,2)^t$. Hence $Av_3=0\cdot v_1+1\cdot v_2+2\cdot v_3$.
A: We have $v_1=(1,0,0)^T\in \ker(A-I)$ is an eigenvector associated to the eignevalue $1$
moreover, since $\ker(1-2I)=\mathrm{span}((1,1,0)^T)$ then $v_2=(1,1,0)^T$  is an eigenvector of $A$ associted to the eigenvalue $2$ and the matrix $A$ isn't diagonalizable. Finally we look for a vector $v_3$ s.t. $Av_3=v_2+2v_3$ and we find $v_3= (0,\frac{1}{2},\frac{1}{2})^T$ hence with 
$$P=(v_1\ v_2\ v_3)=\left(\begin{matrix}1&1&0\\
0&1&\frac{1}{2}\\
0&0&\frac{1}{2}\end{matrix}\right)\quad\text{and}\quad J=\left(\begin{matrix}1&0&0\\
0&2&1\\
0&0&2\end{matrix}\right)$$
we have
$$J=P^{-1}AP$$
