Let $G$ be a group, and let $g \in G$. Let $\varphi_g : G \to G $ be defined by $\varphi_g(x) = gx$ for $x \in G$. For which $g \in G$ is $\varphi_g$ a homomorphism?
I solved this below
Let $x , y \in G$ $$\varphi(xy) = g (xy) $$ in order to be homomorphism. $$\varphi(xy) = \varphi (x) \varphi(y) $$ so $$g (xy) = gx gy$$ This is possible only if $g = e_G$ where $e_G$ is identity in $G$. Then $$e_G (xy) = e_G(x) e_G(y)$$ $$(xy) = (x) (y)$$ $$\varphi(xy) = \varphi (x) \varphi(y) $$ Is this a correct reasoning?
This is good work. Well done! It needs some extra justification, though, as described by @ThomasAndrews in the comments above.
There's a quicker way.
Lemma: The only idempotent of a group is the identity.
Proof: Let $x^2=x$. Then $xx=x=ex$, so, multiplying on the right by $x^{-1}$, we get $x=e$.$\square$
We have
$$\begin{align} g&=ge\\ &=\varphi_g(e)\\ &=\varphi_g(ee)\\ &=\varphi_g(e)\varphi_g(e)\\ &=gege\\ &=g^2. \end{align}$$
Thus $g=e$.