Let $m$ and $n$ be two positive integers relatively prime to each other. Prove that for every positive integer $k$, the following statements are equivalent:
1. $n + m$ is a divisor of $n^2 + km^2$;
2. $n+m$ is a divisor of $k+1$.
I couldn't do too much of this question, I feel that we should find a integer $q$ such that $n^2+km^2-q(n+m)=k+1$, but I can't go on and even see where $\gcd(m,n)=1$ applies. I'll be thankful for help.