Let $\backsim$ be an equivalence relation on a group $G$ and $N=\{a\in G\mid a\backsim e\}$. Then $\backsim$ is a congruence relation on $G$ if and only if $N$ is a normal subgroup of $G$ and $\backsim$ is congruence modulo $N$.
I have written a solution below. Exercise 4 section 5 is corollary of exercise 3 section 5. We only need to prove $\backsim =\equiv_r \,\operatorname{mod} N$, rest follows from exercise 3 section 5. Which states “Let $N$ be a subgroup of a group $G$. $N$ is normal in $G$ if and only if (right) congruence modulo $N$ is a congruence relation on $G$”.