I'm reading Munkres Topology and I'm stuck in lemma 68.5 as you can see he uses the theorem 68.4 in order to imply that there is a isomorphism between $G$ and $G'$, but in order for this theorem to be applied we must have that $\{i_{\alpha}(G_{\alpha})\}$ and $\{i'_{\alpha}(G_{\alpha})\}$ generate $G$ and $G'$ which for $G'$ is just fine because it is stated that is a free product of the groups $\{i'_{\alpha}(G_{\alpha})\}$ but how do we know that $G$ can be generated by $\{i_{\alpha}(G_{\alpha})\}$? We say that the groups $G_\alpha$ generate $G$ if every element $x$ of $G$ can be written as a finite sum of elements of the groups $G_\alpha$.
Lemma 68.5. Let $\{G_{\alpha}\}_{\alpha \in J}$ be a family of groups; let $G$ be a group; let $i_{\alpha} : G_{\alpha} \rightarrow G$ be a family of homomorphisms. If the extension condition of Lemma 68.3 holds, then each $i_{\alpha}$ is a monomorphism and $G$ is the free product of the groups $i_{\alpha}(G_{\alpha})$.
Proof. We first show that each $i_{\alpha}$ is a monomorphism. Given an index $\beta$, let us set $H = G_{\beta}$. Let $k_{\alpha} : G_{\alpha} \rightarrow H$ be the identity if $\alpha = \beta$, and the trivial homomorphism if $\alpha \neq \beta$. Let $h : G \rightarrow H$ be the homomorphism given by the extension condition. Then $h \circ i_{\beta} = h_{\beta}$, so that $i_{\beta}$ is injective. By Theorem 68.2, there exists a group $G'$ and a family $i'_{\alpha} : G_{\alpha} \rightarrow G'$ of monomorphisms such that $G'$ is the free product of the groups $i'_{\alpha}(G_{\alpha})$. Both $G$ and $G'$ have the extension property of Lemma 68.3. $\color{red}{\text{The preceding theorem then implies that there is an isomorphism}} $ $\phi : G \rightarrow G'$ such that $\phi \circ i_{\alpha} = i'_{\alpha}$. It follows at once that $G$ is the free product of the groups $i'_{\alpha}(G_{\alpha})$.
Theorem 68.4 (Uniqueness of free products).} Let $\{G_{\alpha}\}_{\alpha \in J}$ be a family of groups. Suppose $G$ and $G'$ are groups and $i_{\alpha} : G_{\alpha} \rightarrow G$ and $i'_{\alpha} : G_{\alpha} \rightarrow G'$ are families of monomorphisms, such that the families $\{i_{\alpha}(G_{\alpha})\}$ and $\{i'_{\alpha}(G_{\alpha})\}$ generate $G$ and $G'$, respectively. If both $G$ and $G'$ have the extension property stated in the preceding lemma, then there is a unique isomorphism $\phi : G \rightarrow G'$ such that $\phi \circ i_{\alpha} = i'_{\alpha}$ for all $\alpha$.
I think it is a mistake, and it should be assumed that $\{i_\alpha(G_\alpha)\}$ generate $G$ in Lemma 68.5.
Consider situation where the indexing set $J=\{1\}$ is a singleton and $G_1=\mathbb{Z}$. Now let $G=\mathbb{Z}\times\mathbb{Z}$ and $i_1:\mathbb{Z}\to \mathbb{Z}\times \mathbb{Z}$ be given by $i_1(x)=(x,0)$. Of course $i_1(G_1)$ does not generate $G$. So what I did here is I added $\mathbb{Z}$ to $\mathbb{Z}$, but the choice is arbitrary. We can also consider $\mathbb{Z}\times K$ for any group $K$.
Now, if $H$ is any group and $h_1:\mathbb{Z}\to H$ is a homomorphism, then we can simply define $h:\mathbb{Z}\times\mathbb{Z}\to H$ by $h(x,y)=h_1(x)$. Then $h_1=h\circ i_1$ and so $G$ together with $i_1$ clearly satisfies the extension property, but $G=\mathbb{Z}\times\mathbb{Z}$ is not (free product of) $\mathbb{Z}$.
Note that this reasoning can be generalized to any indexing set $J$. The point of this argument is that we can always add something to $G$ via for example direct product (which rarely gives a free product, in fact we can always choose $K$ to guarantee that) and retain the extension property. Without increasing the number of $i_\alpha$ homomorphisms. And so being generated by $\{i_\alpha(G_\alpha)\}$ has to be assumed.