EDIT (credit @johnfowles): Suppose we began by looking for an invariant equation. Then taking the equation mod 10 doesn't change the invariant from being a constant, if it was invariant without it. So that step seems to be a step that doesn't change the invariant constant, but it allows us to equate coefficients on corresponding $x_i$'s.
For more information on @johnfowles methodology to understand the why of this, please look at the comments.
Since the seventh term is the sum mod 10, the invariant is a constant expressed by some operations of a set of six consecutive terms. Also, since the seventh is the sum, I would hazard that the invariant is a weighted sum, as in each term is multiplied by a different coefficient. Since the last term is taken mod 10, the entire invariant is also taken mod 10.
Take $a, b, ... f$ to be the coefficients of the invariant.
Now consider each $x$ separately in the total sum.
\begin{align}
a\cdot x_1 &\equiv f \cdot x_1 \mod 10\\
b \cdot x_2 &\equiv (a+f) \cdot x_2\mod 10 \text{ (i'll ignore the variables now)}\\
c &\equiv b+ f \mod 10\\
d &\equiv c+ f \mod 10\\
e &\equiv d+ f \mod 10\\
f &\equiv e+ f \mod 10\\
\end{align}
Now substitute $a \equiv f$
\begin{align}
a&\equiv f \mod 10\\
b &\equiv 2f \mod 10 \\
c &\equiv 3f \mod 10\\
d &\equiv 4f \mod 10\\
e &\equiv 5f \mod 10\\
f &\equiv 6f \mod 10\\
\end{align}
Clearly, $a \equiv f \equiv 2, b \equiv 4, c \equiv 6, d \equiv 8, e\equiv 10$.
EDIT (credit @johnfowles): Suppose we began by looking for an invariant equation. Then taking the equation mod 10 doesn't change the invariant from being a constant, if it was invariant without it. So that step seems to be a step that doesn't change the invariant constant, but it allows us to equate coefficients on corresponding $x_i$'s.
For more information on @johnfowles methodology to understand the why of this, please look at the comments.
Since the seventh term is the sum mod 10, the invariant is a constant expressed by some operations of a set of six consecutive terms. Also, since the seventh is the sum, I would hazard that the invariant is a weighted sum, as in each term is multiplied by a different coefficient. Since the last term is taken mod 10, the entire invariant is also taken mod 10.
Let's take the first two sequences:
\begin{align} &x_1, &x_2, &x_3, &x_4, &x_5, &x_6\\ &x_2, &x_3, &x_4, &x_5, &x_6, &(x_1+x_2+x_3+x_4+x_5+x_6)\mod{10}\\ &a, &b, &c, &d, &e, &f\\ \end{align} (forgive the formatting, idk why align isn't working)
Take $a, b, ... f$ to be the coefficients of the invariant.
Now consider each $x$ separately in the total sum.
\begin{align} a\cdot x_1 &\equiv f \cdot x_1 \mod 10\\ b \cdot x_2 &\equiv (a+f) \cdot x_2\mod 10 \text{ (i'll ignore the variables now)}\\ c &\equiv b+ f \mod 10\\ d &\equiv c+ f \mod 10\\ e &\equiv d+ f \mod 10\\ f &\equiv e+ f \mod 10\\ \end{align} Now substitute $a \equiv f$ \begin{align} a&\equiv f \mod 10\\ b &\equiv 2f \mod 10 \\ c &\equiv 3f \mod 10\\ d &\equiv 4f \mod 10\\ e &\equiv 5f \mod 10\\ f &\equiv 6f \mod 10\\ \end{align} Clearly, $a \equiv f \equiv 2, b \equiv 4, c \equiv 6, d \equiv 8, e\equiv 10$.
Note that $f=12 \equiv 2 \mod 10$