Generalized Method to find nth power of matrix in $P^n = 5I - 8P$ 
Question: Let $I$ be an identity matrix of order $2 \times 2$ and $P = \begin{bmatrix}
    2 & -1 \\
    5 & -3 \\
   \end{bmatrix}$. Then the value of $n ∈ N$ for which $P^n = 5I - 8P$ is equal to _______.
Answer: 6
Question Source: JEE Mains $18^{th}$ March Shift-2 2021

By characteristic Equation: $P^2-(\operatorname {Tr}(P))P+(\det (P))I=0$ we can find $n=6$ by hit and trial. i.e. multiplying equation by P gives
$P^3=(\operatorname {Tr}(P))P^2-(\det (P))P = (\operatorname {Tr}(P))[(\operatorname {Tr}(P))P+(\det(P))I]$
And going on solving for $P^6$. But is there a generalized method because it can't be done for high values of $n$ (eg:$100$)?

We can diagonalize the matrix $P$ because it has unique eigenvalues.
One of the benefits of this is in finding matrix powers.
For your example, we have eigenvalues as
$$\lambda_{1,2} = \frac{1}{2} \left(\mp\sqrt{5}-1\right)$$
The eigenvectors are
$$v_{1,2} = \begin{pmatrix} \dfrac{1}{10} \left(5\mp\sqrt{5}\right) \\ 1\end{pmatrix}$$
We can now write $P = V D V^{-1}$ as
$$\begin{pmatrix}
 \dfrac{1}{10} \left(5-\sqrt{5}\right) & 1 \\
 \dfrac{1}{10} \left(\sqrt{5}+5\right) & 1 \\
\end{pmatrix} \begin{pmatrix}
 \dfrac{1}{2} \left(-\sqrt{5}-1\right) & 0\\ 0 & \dfrac{1}{2} \left(\sqrt{5}-1\right)
\end{pmatrix}\begin{pmatrix}
 \dfrac{1}{2} \left(1-\sqrt{5}\right) & 0 \\
 0 & \dfrac{1}{2} \left(\sqrt{5}+1\right) \\
\end{pmatrix}$$
Now $P^n = V D^n V^{-1}$ is
$$\begin{pmatrix}
 \dfrac{1}{10} \left(5-\sqrt{5}\right) & 1 \\
 \dfrac{1}{10} \left(\sqrt{5}+5\right) & 1 \\
\end{pmatrix} \begin{pmatrix}
 \left(\dfrac{1}{2} \left(-\sqrt{5}-1\right)\right)^n & 0\\ 0 & \left(\dfrac{1}{2} \left(\sqrt{5}-1\right)\right)^n
\end{pmatrix}\begin{pmatrix}
 \dfrac{1}{2} \left(1-\sqrt{5}\right) & 0 \\
 0 & \dfrac{1}{2} \left(\sqrt{5}+1\right) \\
\end{pmatrix}$$
