Given some group $G$ that is generated by $a$ and $b$, each of which has infinite order, and some free subgroup $N$ generated by $a^k$ and $b^k$, is there any algorithm that tells me if some $x \in G$ is also in $N$? If not generally, what about for $k=2,3,4$?