Solving this Recurrence Relation in terms of previous values. What will be the value of $X(n)$ and $Y(n)$ in terms of given $n,X(0),Y(0)$.
$$
X(n) = X(n-1) + Y(n-1) \\
Y(n) = 2X(n-1) + Y(n-1)
$$

This relation can be written as
$$\begin{pmatrix}X(n) \\ Y(n)\end{pmatrix} = \begin{pmatrix}1 & 1 \\ 2 & 1\end{pmatrix} \begin{pmatrix}X(n - 1) \\ Y(n - 1)\end{pmatrix}. $$
If you define $A = \begin{pmatrix}1 & 1 \\ 2 & 1\end{pmatrix}$, this yields 
$$\begin{pmatrix}X(n) \\ Y(n)\end{pmatrix} = A^n \begin{pmatrix}X(0) \\ Y(0)\end{pmatrix}. $$
Now you only need to calculate the powers of $A$, this works straightforward via diagonalzation.
