Find all $x\in \mathbb{Z}$ with $x \equiv 2 \mod 4$ , $x \equiv 8\mod9$ and $x \equiv 1\mod5$ 
Find all $x\in \mathbb{Z}$ with $x \equiv 2 \mod 4$ , $x \equiv 8\mod9$ and $x \equiv 1\mod5$

My attempt:
$\gcd\left(9,5,4\right) = 1 = 9r+5s+4\times0$
$9 = 1\times5+4$
$5 = 1\times4+1$
so $1 = 5-(9-5) = 2\times5 - 1\times9$
thus $r=-1$ and $s = 2$
so $x = 2\times5\times8 -1\times9\times1=80 - 9=71\mod 180$
But the problem is that $71\equiv8\mod9$ and $71\equiv1\mod5$, but $71 \ne 2 \mod 4$. What is wrong?

Here's an elementary way to do it: Since $x\equiv 2\mod 4$ then $x$ is even. Since $x\equiv 1\mod 5$ then the decimal expansion of $x$ has $1$ or $6$ in the units. But $x$ is even, so it must be $6$.
So $x=10k+6$ for some $k$. But also, $x\equiv 8\mod 9$, so the sum of the algarisms of $x$ is of the form $9p+8$. But since $x=10k+6$, the sum of the algarisms of $x$ is $k+6$, i.e.
$$9p+8=k+6$$
so $k=9p+2$. Substituting, we have $x=10(9p+2)+6=90p+26$ for some $p$.
But now we use again that $x\equiv 2\mod 4$, which means that the remainder of the division of $x=90p+26$ by $4$ is $2$. From this, $90p$ should be divisible by $4$, so $p$ is even, say $p=2q$.
Therefore, $x=180q+26$, for some $q=0,1,2,\ldots$. Conversely, you can check that any number of this form satisfies all desired congruences.
