Determine a formula for $x_n$ given the following discrete dynamical system with initial values $x_0 = 1$ and $y_0$ = 4.
$x_{n+1} = 5x_n + y_n$
$y_{n+1} = 2x_n + 4y_n$
i think you have to calculate this with help of the formula:
my $x_k$ formula will be: $x_k = 2 *6^k [1,1] + 1 * 3^k * [-1 , 2]$
the answer of the questioin is:

can someone explain me the following:
*what did i calculate? i want to know this so when they ask for this, i know what to answer to the question.
*how do i come to the solution of $x_n$?
thanks in advance.

As mentioned you are solving a linear system, in this case the system: $$\begin{pmatrix}x_{n}\\ y_{n}\end{pmatrix}=A\begin{pmatrix}x_{n-1}\\ y_{n-1}\end{pmatrix}$$ where $$A=\begin{pmatrix}5 & 1\\ 2 & 4\end{pmatrix}.$$ Note that $A$ has eigenvalues $3$ and $6$ and respective corresponding eigenvectors $(-1,2)$ and $(1,1)$. The initial vector is given by $$\begin{pmatrix}x_{0}\\ y_{0}\end{pmatrix}=\begin{pmatrix}1\\ 4\end{pmatrix}=2\begin{pmatrix}1\\ 1\end{pmatrix}+\begin{pmatrix}-1\\ 2\end{pmatrix}$$ hence $$\begin{pmatrix}x_{n}\\ y_{n}\end{pmatrix}=A\begin{pmatrix}x_{n-1}\\ y_{n-1}\end{pmatrix}=2A^{n}\begin{pmatrix}1\\ 1\end{pmatrix}+A^{n}\begin{pmatrix}-1\\ 2\end{pmatrix}=2\cdot6^{n}\begin{pmatrix}1\\ 1\end{pmatrix}+3^{n}\begin{pmatrix}-1\\ 2\end{pmatrix}.$$ It follow that $x_{n}=2\cdot6^{n}-3^{n}$.
This is the underlying mathematics that gives you your formula.