Replace $\lim_{k\to\infty}\lim_{m\to\infty}f(k,m)$ and $\lim_{m\to\infty}\lim_{k\to\infty}f(k,m)$ by $\lim_{n\to\infty}f(n,n)$? 
When can we replace
  $\displaystyle\lim_{k\to\infty}\lim_{m\to\infty}f(k,m)$ and
  $\displaystyle\lim_{m\to\infty}\lim_{k\to\infty}f(k,m)$ by
  $\displaystyle\lim_{n\to\infty}f(n,n)$ ?

For the case $\displaystyle f(k,m)=\left(\frac{1}{k}\right)^{1/m}$ since its limit does not exist for it converging to $0$ or $1$, so it won't matter if we replace both $m$ and $k$ by $n$?

Your statement "since its limit does not exist for it converging to 0 or 1," doesn't make any sense to me, so I'm going to skip over it. Both of the first two limits you've written down do exist for this particular function:
\begin{align}
\lim_{k\to\infty}\lim_{m\to\infty} \left(\frac{1}{k}\right)^{1/m} 
&= \lim_{k\to\infty} \left(\frac{1}{k}\right)^0 \\
&= \lim_{k\to\infty} 1 \\
&= 1
\end{align}
By contrast, 
\begin{align}
\lim_{m\to\infty}\lim_{k\to\infty} \left(\frac{1}{k}\right)^{1/m} 
&= \lim_{m\to\infty} \left(0\right)^{1/m} \\
&= \lim_{m\to\infty} 0 \\
&= 0
\end{align}
So this is a perfect example of when you cannot swap the order. And if you try the middle case (replacing $m$ and $k$ both with $n$), you'll again get $1$. 
In short ... this stuff's subtle, and if there were an easy rule like this, your textbook would probably have mentioned it. 
