we are given that $x+\beta y_{n+1}=k_n+y_n$ for all $n\in\mathbb{N}\cup\{0\}$, where $\beta\in(0,1)$, $y_0=0$, and $k_n$ is 6 whenever $n$ is even and 4 whenever odd. Being the naive mathematician I do the following
$x+\beta y_1=6$
$\beta x+\beta^2y_2=4\beta + \beta y_1$
$\beta^2 x + \beta^3 y_3 = 6\beta^2 + \beta^2 y_2$
etc.
Then I add the countably infinitely many equations side by side and cancel terms.
$x+\beta y_1+\beta x+\beta^2y_2+\beta^2x+\beta^3y_3+\cdots= 6+4\beta+\beta y_1 +6\beta^2+\beta^2 y_2+\cdots$
The remaining part of the algebra is not of interest. I was wondering under what conditions what I'm doing is formally correct. Under what circumstances it would fail, in the sense that I cannot add them all side by side and simplify. My intuition tells me that we would need $\lim_{n\rightarrow\infty} \beta^ny_n = 0$ but if people here can help me out that will be very much appreciated. Also, is there a textbook I can read more on this topic?
You can't literally add infinitely many things, but you can take an infinite series, assuming it converges. In this case what you want to look at is a partial sum.
$$(x + \beta y_1) + (\beta x + \beta^2 y_2) + \ldots + (\beta^{n-1} x + \beta^{n} y_{n}) = 6 + (4 \beta + \beta y_1) + \ldots + (k_{n-1} \beta^{n-1} + \beta^{n-1} y_{n-1})$$
which you can then solve for $\beta^n y_n$.