In [1] a group $F$ is free over a set $X \subseteq F$ if any mapping $\phi$ from $X$ into a group $H$ can be uniquely extended to a homomorphism $\phi^\ast$ from $F$ to $H$.
Later an equivalent class on the set of all word $W$ over $X^\pm$ is defined as follows: Two words $w_1$ and $w_2$ are equivalent if there is a chain of transformations of the form adding or removing pairs of the form $aa^{-1}$, leading from $w_1$ to $w_2$. $[X]$ is the set of all of its equivalence classes and $F = W/\sim$.
Proposition 1.6 states
Proposition 1.6 $F$ is a free group with basis the set $[X]$ of all equivalence classes and $|[X]| = |X|$.
and the proof works as follows:
Let $H$ be any group, and let $\phi$ map the set $[X|$ of equivalence classes $[x]$ of elements $x \in X$ into $H$. To show that $|[X]| = |X|$, we observe that if $x_1, x_2 \in X$ and $x_1 \neq x_2$, then $[x_1] \neq [x_2]$, since the two one-letter words $x_1$ and $x_2$ are reduced. The $\phi$ determines a map $\phi_1 = X \to H$ with $[x]\phi = x \phi_1$. Define an extension $\phi_1^\ast$ of $\phi_1$ from $W$ into $H$ by setting $w \phi_1^\ast = (x_1^{e_1} \ldots x_n^{e_n}) \phi_1^\ast = (x_1 \phi_1^\ast)^{e_1} \ldots (x_n \phi_1^\ast)^{e_n}$, $x_i \in X$, $e_i = \pm 1$. If $w_1$ and $w_2$ are equivalent, then $w_1\phi_1^\ast = w_2 \phi_1^\ast$, hence $\phi_1^\ast$ maps equivalent words onto the same element of $H$, thereby inducing a map $\phi^\ast \colon F \to H$ that is clearly a homomorphism and an extension of $\phi$.
Where is the uniqueness of the extension $\phi^\ast$ needed?
[1] Lyndon, Roger C.; Schupp, Paul E., Combinatorial group theory., Classics in Mathematics. Berlin: Springer. xiv, 339 p. (2001). ZBL0997.20037.
Uniqueness can be deduced assuming that there are maps $\psi$ which restricted over $X$ satisfy $\psi|X=\phi_1^*|X$. But then
\begin{eqnarray*} w\psi &=& (x_1^{e_1} \ldots x_n^{e_n}) \psi\\ &=& (x_1 \psi)^{e_1} \ldots (x_n \psi)^{e_n}\\ &=& (x_1 \phi_1^\ast)^{e_1} \ldots (x_n \phi_1^\ast)^{e_n}\\ &=&(x_1^{e_1} \ldots x_n^{e_n}) \phi_1^\ast\\ &=&w \phi_1^\ast \end{eqnarray*} for each $w$.