We know that a free group F(S) on a set S comes equipped with a function $\alpha_S : S \to F(S)$. For any function $\beta: S \to G$, for some group $G$, there exists a unique homomorphism $\phi : F(S) \to G$ such that $\phi \circ \alpha_S = \beta$.
Suppose that $f : S \to T$ is a function between sets $S$, $T$. Show that there exists a unique homomorphism between free groups $F(f) : F(S) \to F(T)$ such that $F(f) \circ \alpha_S = \alpha_T \circ f$.
I do not see how $F(f)$ is a homomorphism.
$F(f)$ is the unique morphism induced by the map $\alpha_T \circ f:S \to F(T)$. By definition of the universal property you mentioned, this morphism is a group homomorphism.