Let $m=pq$ where $p,q$ are primes. Prove that if $e$ is not coprime to $\phi(m)$, then the mapping $x \rightarrow x^e \pmod m$ from $Z_m^*$ to $Z_m^*$ is not one-to-one.
My attempt: Let $s,l$ be integers s.t $e = sg$ and $\phi(m) = lg$ for $g = \gcd(\phi(m),e)$. then for any $x \in Z_m^*$ we have $({x^l})^e = x^{lsg}=({x^{\phi(m)}})^s \equiv 1^s \pmod m \equiv 1 \pmod m$
So if i can show that $x^l \not\equiv 1 \pmod m$ for some $x$, i found two distinct element in the group who are both mapped to 1
Since I know that $g > 1$ then $l < \phi(m)$, meaning I have to find an element with order $> l$, and I am stuck there, and since I haven't used $\phi(m) = (p-1)(q-1)$ I guess it has something to do with it. Any guidance?
How much group theory do you know? This is actually a consequence of a general fact about abelian groups. I'll post the answer here, and maybe someone else (or you) can distill it down to your special case.
Let $G$ be a finite abelian group of order $n$. Suppose $\gcd(e,n) > 1$, where we can--without loss of generality--assume $2 \leq e \leq n$ (so $e$ is "small"). Thus there must be some prime $r$ such that $r \mid e$ and $r \mid n$. Since $r \mid n$, there exists an element $a \in G$ of order $r$ by Cauchy's (or Sylow's) Theorem. Since $r \mid e$ we have $e=rk$ for some integer $k$.
Consider your function $f: G \to G$ via $f(x)=x^e$, which is a homomorphism as $G$ is abelian. Now, if $1$ is the identity element of $G$ (which I'm avoiding calling $e$ for obvious reasons) we have $f(1) =1^e =1$. On the other hand, $f(a) = a^e = a^{rk} = (a^r)^k=1^k=1$. Since $a \neq 1$, $f$ is not one-to-one.
Your result comes from this one under the dictionary: $$ G = \mathbb{Z}_m^* $$ $$ n = \varphi(m). $$
Edit/Addendum: Here's the distilled version for you. Take $f: \mathbb{Z}_m^* \to \mathbb{Z}_m^*$ via $f(x)=x^e$ where $d=\gcd(e,\varphi(m))>1$. We may write $e=dk$ and $\varphi(m) = dj$ for some integers $k$ and $j$. By Euler's Theorem, $x^{\varphi(m)} = 1$ for any $x \in \mathbb{Z}_m^*$.
Now, any $j$th power of any element $x \in \mathbb{Z}_m^*$ will map to $1$ under $f$. This is easy to see: $$ f(x^j) = x^{je}= x^{jdk} =(x^{jd})^k=(x^{\varphi(m)})^k = 1^k=1. $$ Now just convince yourself that not all $j$th powers can be equal, so we have at least two different elements mapping to $1$. That does it. (Maybe this is equivalent to your effort posted in your question. If so, sorry if it's not helpful.)