I need to solve the following equation:
$x^2\equiv 1 (\textrm{mod }1000)$
According to the chinese remainder theorem I can rewrite this as:
$x^2 \equiv 1 (\textrm{mod }8)$ and $x^2 \equiv 1 (\textrm{mod }125)$
But I don't understand how I should know to which system of equations I should change to. Why not choose $\textrm{mod } 10$ for example. Or why not split the $x^2 \equiv 1 (\textrm{mod }8)$ into $x^2 \equiv 1 (\textrm{mod }2)$.
Then my other question is how do you solve these equations for larger numbers? Because for $x^2 \equiv 1 (\textrm{mod }8)$ I can find the solutions by simple trying but this will take to long for $x^2 \equiv 1 (\textrm{mod }125)$.
Your second question was how to solve the equation $x^2-1\equiv0\pmod{125}$. Because $125=5^3$, and $5$ is prime, $(x-1)$ and $(x+1)$ should in total have at least three factors $5$. Because $\gcd(x-1,x+1)\leq2$, it cannot happen that both $x-1$ and $x+1$ are divisible by $5$, so it follows that either $125\vert x+1$ and $5\nmid x-1$ or $125\vert x-1$ and $5\nmid x+1$.