<s>[INST] How to find all solutions for : $a^3 \equiv b^3 \pmod{7^3}$, knowing that $7 \nmid ab$. 
Find all integers $a$ and $b$ such that $$a^3 \equiv b^3 \pmod{7^3}\,,$$ knowing that $7 \nmid ab$.

As a try, I noticed that, since $\gcd(b, 7)=1$, there exists $x \in \mathbb{N}$ such that $b\cdot x \equiv 1 \pmod{7} \Rightarrow b^3 \cdot x^3 \equiv 1 \pmod{7^3}$. Thus $a^3\equiv b^3 \pmod{7^3} \iff (ax)^3\equiv 1\pmod{7^3}$. After this I tried to use Euler's totient function, but I do not know where I should begin.
 [/INST] Given $7\nmid ab$, $a^3\equiv b^3\bmod 7^3\iff (a/b)^3\equiv1\bmod 7^3$.
Let $x\equiv a/b\bmod 7^3$.  We are looking for $x$ such that $7^3|x^3-1=(x-1)(x^2+x+1)$.
Now if $7|x-1$ and $x^2+x+1$, then $7|x^2+x+1-(x+2)(x-1)=3$, a contradiction.
So $7^3|x-1$ (i.e., $x\equiv1\bmod7^3$) or $7^3|x^2+x+1$.
Now we are looking for $x$ such that  $x^2+x+1\equiv0\bmod7^3$.
Note that $x\equiv 2$ and $x\equiv 4$ are the solutions to $x^2+x+1\equiv0\bmod7$.
If $x=7k+4$ is a solution to $x^2+x+1\equiv0\bmod7^2$, then $k\equiv2\bmod7$, so $x\equiv18\bmod7^2$.
If $x=7^2k+18$ is a solution to $x^2+x+1\equiv0\bmod7^3$,
then $k\equiv0\bmod7$, so $x\equiv18\bmod7^3$.
If $x=7k+2$ is a solution to $x^2+x+1\equiv0\bmod7^2$, then $k\equiv4\bmod7$, so $x\equiv30\bmod7^2$.
If $x=7^2k+30$ is a solution to $x^2+x+1\equiv0\bmod7^3$,
then $k\equiv6\bmod7$, so $x\equiv324\bmod7^3$.
(I could have argued that, if $x\equiv18$ is a solution,
then $x^4+x^2+1\equiv x+x^2+1\equiv0$, so $x^2\equiv18^2=324$ is a solution too.)
So either $a\equiv b$ or $a\equiv18b$ or $a\equiv324 b\bmod 7^3$, and then $a^3\equiv b^3\bmod 7^3$.
</s>