Let $A$ be the following $3\times 3$ upper triangular matrix.
\[A=\begin{bmatrix}
1 & x & y \\
0 &1 &z \\
0 & 0 & 1
\end{bmatrix},\]
where $x, y, z$ are some real numbers.
Determine whether the matrix $A$ is invertible or not. If it is invertible, then find the inverse matrix $A^{-1}$.
Suppose that $A$ and $P$ are $3 \times 3$ matrices and $P$ is invertible matrix.
If
\[P^{-1}AP=\begin{bmatrix}
1 & 2 & 3 \\
0 &4 &5 \\
0 & 0 & 6
\end{bmatrix},\]
then find all the eigenvalues of the matrix $A^2$.