I was shown a 2x2 matrix power formula, given here:

A^{n}=(λ_{2}*λ_{1}^{n}-λ_{1}*λ_{2}^{n})/(λ_{2}-λ_{1})*I + (λ_{2}^{n}-λ_{1}^{n})/(λ_{2}-λ_{1})*A

And I found that I quite liked it. I brought it up to my professor, and asked if something like this could be used on an exam, and he said that it could, if I could prove it. I can see that it likely has it's roots in the Cayley-Hamilton theorem, but I am curious as to how the two coefficients were worked out. I originally tried to solve it with the A=PDP^{-1}method, but quickly found myself drowning in long equations, and my abcd matrix was being represented with just a and b, leaving no c and d. (and thereby making it difficult/impossible to extract the A matrix)

Can anyone give me a hint? Thank you.