We know that method of finding $k^{th}$ root modulo $m$, i.e. if $$x^k\equiv b\pmod m,\tag {$\clubsuit$}$$ with $\gcd (b,m)=1$, and $\gcd(k,\varphi(m))=1$, then $x\equiv b^u\pmod m$ is a solution to $(\clubsuit)$, where $ku-v\varphi(m)=1$. Because $$\begin{array} {}x^k &\equiv \left(b^u\right)^k\pmod m\\ &\equiv b^{uk}\pmod m\\ &\equiv b^{1+v\varphi (m)}\pmod m\\ &\equiv b\cdot b^{v\varphi(m)}\pmod m\\ &\equiv b\cdot \left(b^{\varphi (m)}\right)^v\pmod m\\ &\equiv b\pmod m \end{array}$$
Thus $x\equiv b^u\pmod m$ is a solution to $(\clubsuit)$.
Here we use $\gcd(b,m)=1$, since we used Euler's theorem that $b^{\varphi(m)}\equiv1\pmod m$.
But I am asked to prove that if $m$ is the product of distinct primes, then $x\equiv b^u \pmod m$ is always a solution, even if $\gcd (b,m)\gt1.$
What I did, is say $m=p_1p_2$. Then $\varphi(m)=(p_1-1)(p_2-1)$ $$\begin{array} {}b^{uk}&\equiv b\cdot b^{\varphi (m)}\pmod m\\ &\equiv b\cdot b^{(p_1-1)(p_2-1)}\pmod m \end{array}$$
Now, we just have to compute $b^{(p_1-1)(p_2-1)}\pmod {p_i}$. Here I got stuck, because I really can't use the little theorem for every $p_i$'s, since some $p_i$ can exist in $b$.
Can someone help me?