Solve $\begin{cases}8x^{329} + 6x^{628} -2 \equiv 1 \pmod {15}\\(x^{1328} - 4)^2 \equiv 0 \pmod 7\end{cases}$ . I came across this problem and have absolutely no idea how to solve it. The system is as follows
$$\begin{cases}8x^{329} + 6x^{628} -2 \equiv 1 \pmod {15}\\(x^{1328} - 4)^2 \equiv 0 \pmod 7\end{cases}$$
I appreciate any help you can give me
 A: $8x^{329}+6x^{628}−2≡1\pmod{15}$
If this is true modulo 15, it must be true modulo 3 and modulo 5
Fermat's little theorem: For prime $p$ and $x$ not divisible by $p$
 $x^{p-1} \equiv 1 \pmod p$
$3x+x^{0}−2≡1\pmod{5}\\
3x ≡ 2\pmod{5}$
$x≡0\pmod{3}$
$(x^{1328} - 4)^2 \equiv 0\pmod 7$ since $7$ is prime $7|a^2 \implies 7|a$
and then use Fermat's little theorem again to reduce the power.
$x^2  \equiv 4\pmod 7$ which has 2 solutions
Can you take it from here?
A: Hint:
Use the Chinese remainder theorem, and solve separately
$$8x^{329}+6x^{628}-2\equiv 1\mod 3\iff 2x^{329}\equiv 0\mod 3\iff x\equiv 0\mod 3$$
and similarly
$$3x^{329}+x^{628}\equiv -2\mod 5$$
This implies $x\not\equiv 0\mod 5$, so by lil' Fermat, $x^4\equiv 1\mod 5$, and the equation becomes
$$3x^{329\bmod 4}+x^{628\bmod 4}\equiv 3x+1\equiv -2\mod 5,$$
so that you have to solve 
$$3x\equiv-3\mod 5\iff x\equiv -1\mod 5.$$
Can you proceed from here?
Second equation:
As $7$ is prime, $\;(x^2-4)^2\equiv 0\mod 7\iff x^2-4\equiv 0\iff x\equiv\pm 2\mod 7$.
A: Consider the second equation. $x \equiv 0 \bmod 7$ is not a solution. Therefore, by Fermat, we can use $x^6 \equiv 1$ to reduce it to
$$
0 \equiv (x^{1328} - 4)^2 \equiv (x^2-4)^2 \bmod 7
$$
The solution is $$x \equiv \pm 2 \bmod 7$$
Analogously, by simplifying coefficients and exponents, the first equation reduces to
$$
2x^{2} \equiv 0 \bmod 3
\\
3x + 3 \equiv 0 \bmod 5
$$
The solution is
$$
x \equiv 0 \bmod 3
\\
x \equiv 4 \bmod 5
$$
It remains to combine these conditions into conditions mod $105$.
