Unit, co-unit of adjunction
Solution 1:
(I) Let's consider the free group functor $F \colon \mathbf{Set} \to \mathbf{Group}$ and the relative forgetful functor $f \colon \mathbf{Group} \to \mathbf{Set}$.
The unit is the family of functions $\eta_X \colon X \to f(F(X))$ given by the embedding sending every $x \in X$ into $\eta_X(x)=x \in f(F(X))$: i.e. it sends every element of $X$ into itself inside the group.
The counit is given by the family $\epsilon_G \colon F(f(G)) \to G$ sending every string of elements of $G$ like $\langle g_1,\dots,g_n\rangle \in F(f(G))$ into $\epsilon_F(\langle g_1,\dots,g_n \rangle)=g_1\dots g_n \in G$ their product.
(II) Let $F \colon \mathbf{Group} \to \mathbf{Ab}$ the abelianization functor and $f \colon \mathbf{Ab} \to \mathbf{Group}$ the embedding (forgetful) functor from $\mathbf{Ab}$ into $\mathbf {Group}$.
The unit in this case is given by the family of canonical quotient projections $\eta_G \colon G \to f(F(G))=G/G'$ (where $G'$ is the subgroup of the commutator of $G$).
The counit $\epsilon_A \colon F(f(A))\cong A \to A$ is clearly given by the identity.
To see that these are exactly those unit and counit you could either observe that they verify the universal properties required to satisfy by units and counits, or that they verify the zig-zag identities, or simply calculate them explicitly using the yoneda lemma from the relative adjunctions (the natural isomorphisms $\mathbf{Group}(F(X),G)\cong \mathbf{Set}(X,G)$ and $\mathbf{Ab}(F(G),A)\cong \mathbf{Ab}(G,f(A))$.
Edit let's show that those are the unit and counit of the adjunction using yoneda: or to be exact their corollary.
By the general theory we have that if $\varphi \colon \mathbf{A}(F(X),A) \cong \mathbf{X}(X,U(A))$ is an adjunction between the functors $F \colon \mathbf X \to \mathbf A$ and $U \colon \mathbf A \to \mathbf X$ then the unit is given by the family $\eta_X = \varphi(1_{F(X)})$ while the counit $\epsilon_A \colon \varphi^{-1}(1_U(A))$.
(I) In the case of the free group functor $F$ and its forgetful functor the adjunction is given by the natural isomorphism
$$\varphi \colon \mathbf{Group}(F(X),G) \cong \mathbf {Set}(X,f(X))$$ is given by the mapping sending every homomorphism $\sigma \colon F(X) \to G$ (a morphism of $\mathbf{Group}$) to its restriction to the subset $X$.
So $\varphi(1_{F(X)})$ is the restriction of the map $1_{F(X)}$ (or to be exact of $f(1_{F(X)})$, its underlying function) to the subset $X$, that is the map $\varphi(1_{F(X)}) \colon X \to f(F(X))$ the embedding of $X$ inside of the group $F(X)$.
The counit is given $\varphi^{-1}(1_{f(G)})$ by the unique homomorphism $F(f(G)) \to G$ whose restriction to $f(G)$ is the identity. By general theory for every group homomorphism $\sigma \colon F(X) \to G$ we have $\varphi(\sigma) = \sigma \circ\eta_X$, where $\eta_X \colon X \to f(F(X))$ (the unit above). If we take $\epsilon_G$ as above then $\varphi(\epsilon_G)=\epsilon_G \circ i$ is such that $$\epsilon_G(i(g))=\epsilon_G(\langle g \rangle)=g=i(g)$$ for every $g \in G$. So $\varphi(\epsilon_G)=1_{f(G)}$ and so $\varphi^{-1}(1_{f(G)})=\epsilon_G$.
(II) Let's now $F \colon \mathbf {Group} \to \mathbf {Ab}$ be the abelianization functor and $f \colon \mathbf{Ab} \to \mathbf{Group}$ the forgetful functor. Then the adjunction is give by $$\varphi \colon \mathbf{Ab}(F(G),A) \cong \mathbf{Group}(G,f(A))$$ sending every morphism $\sigma \colon F(G)\cong G/G' \to A$ (where $G'$ is the derived subgroup of $G$) into the group homomorphism $\sigma \circ \eta_G \colon G \to A$ (where $\eta_G \colon G \to G/G'$ is the canonical projection).
By the same argument as before it follows that $\eta_G$ is the unit, since $\varphi(1_{F(g)})=\eta_G$.
In a similar way we observe that for every abelian group $A \in \mathbf{Ab}$ we have that $\epsilon_A = 1_A$ is a morphism of type $$ \epsilon \colon A \cong A/A'\cong F(f(A)) \to A$$ and $\varphi(\epsilon_A)=\epsilon_A \circ \eta_A = \eta_A$. But in this case $\eta_A$, the canonical projection from $A$ to $A=A/A'$ is an isomorphism, since $A'=0$ because we are in an abelian group. So $\varphi(\epsilon_A)=1_A=1_{f(A)}$ and so $\varphi^{-1}(1_{f(A)})=\epsilon_A$.