My question is related to this one which tells us that fundamental group $\pi_{1}(X,x_0)$ is abelian $\textit{iff}$ for every pair $\alpha$ and $\beta$ of paths from $x_0$ to $x_1$, we have the same group isomorphism.
let $[I,X]$ denote the set of homotopy classes of maps of $I$ into $X$, where $I=[0,1]$. If $X$ is path connected, we can easily prove that $[I,X]$ has only one element, which mean that every path in $X$ is homotopic to each other (even a loop at $x_0 \in X$ is homotopic to path $p:x_0 \rightarrow x_1$).
using this fact, $\hat{\alpha}([f]) = [\bar{\alpha}]*[f]*[\alpha] = [\bar{\beta}]*[f]*[\beta]=\hat{\beta}([f]) $, wehre $\alpha$ and $\beta$ denote paths in path connected space $X$ ($\alpha \simeq \beta \Rightarrow [\alpha]= [\beta] $ ). So, it seems that there is no need for the fundamental group $\pi_{1}(X,x_0)$ to be abelian.
Also, for the proof that $\pi_{1}(X,x_0)$ is abelian, if you take 2 loops at $x_0$, then $[f]*[g]=[g]*[f]$ by virtue of being two paths in path-connected space $X$.
Am I wrong here? Where am I wrong?