When you are given the eigenvectors and eigenvalues of a matrix A and are asked to solve for A^3, for the formula A = PDP^-1 is your diagonal matrix the identity matrix with the eigenvalues swapped with the 1s? for example:
Matrix A is a 3x3 with eigenvalues: 0,1,-1 and eigenvectors: [1,1,0],[0,1,1],[1,0,1]
would the diagonal matrix be 0 0 0
0 1 0
0 0 -1
??
One issue, our diagonal matrix is:
$$J = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{bmatrix}$$
We can now write $P$ using the eigenvectors as column vectors that follow their respective eigenvalues as:
$$P = \begin{bmatrix} 1 & 0 & 1\\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{bmatrix}$$
Lastly, we can write:
$$A^3 = PJ^3P^{-1}$$
Finding $J^3$ is just a matter of writing $\lambda_i^3$ in the diagonal entries of $J$.
You might want to review Diagonalizable Matrices and these notes.