Let group $G$ be a free product of finitely many finite groups $G_i$: $G=G_1\ast \cdots\ast G_n$.
Suppose that $g_1, g_2\in G$ and elements $g_1,g_2$ have infinite order in $G$ and $[g_1,g_2]\ne 1$.
What conditions must satisfy these elements in order to subgroup $\left \langle g_1,g_2 \right \rangle$ was torsion-free (in other words $\left \langle g_1,g_2 \right \rangle\simeq F_2$)?
Let $T$ denote the Bass-Serre tree associated to the free product. Therefore, $G$ acts on $T$ such that:
Now, if $g,h \in G$ have infinite order, they are loxodromic isometries of $T$. Two cases may happen. First, the axes of $g$ and $h$ may have finite intersection. Then, playing ping-pong, it is classifical to prove that $\langle g, h \rangle$ is a free group of rank two. Second, the axes of $g$ and $h$ may have infinite intersection. Then, it is not difficult to find an edge which belongs to this intersection and two exponents $m,n \in \mathbb{Z} \backslash \{0 \}$ such that $g^mh^{-n}$ stabilises this edge. Since edge-stabilisers are trivial, we deduce that $g^m=h^n$.
Consequently, two infinite-order elements $g,h \in G$ generate a free subgroup of rank two if and only if $g^m \neq h^n$ for every $m,n \in \mathbb{Z} \backslash \{ 0\}$.