problem
I have the following system of differential equations; $$ \frac{dx}{dt} = y \tag{1}\label{1}\\ $$ $$ \frac{dy}{dt} = -\lambda^2 x -A \tag{2} \label{2} $$ where $\lambda$ and $A$ values are known values, we also further have the following initial condition values; $$ x_0=x(0) = 0.5 \\ y_0=y(0) =\left. \frac{dx}{dt} \right\vert_{x=0} = 0.25 $$ 1)How do I solve this system using RK4 method?
My attempt
According to RK4 method we get \begin{aligned} x_{n+1}&=x_{n}+{\frac {1}{6}}h\left(k_{1}+2k_{2}+2k_{3}+k_{4}\right),\\ t_{n+1}&=t_{n}+h \end{aligned} where \begin{aligned}k_{1}&=\ y_{n},\\k_{2}&=\ y_{n}+h{\frac {k_{1}}{2}},\\k_{3}&=\ y_{n}+h{\frac {k_{2}}{2}},\\k_{4}&=\ y_{n}+hk_{3}.\end{aligned}
2)After this, should I take $x_n$ or $x_{n+1}$ value for calculating $\eqref{2}$?
3)How do I use matrices to solve this system?