Why is it true that $\gcd(\mathrm{lcm}(n,m),k)\equiv \mathrm{lcm}(n,m)\pmod k$?
In trying to prove that $\langle a^n\rangle\cap\langle a^m\rangle=\langle a^{\mathrm lcm(n,m)}\rangle$ in this answer, one has to prove the above identity in the last step to prove the overall result.
The hint given is that we should write $\gcd(\mathrm{lcm}(n,m),k)$ as a linear combination, and then presumably mod out by $k$: $$\gcd(\mathrm{lcm}(n,m),k)=s\left(\mathrm{lcm}(n,m)\right)+t\left(k\right)$$ for some $s,t\in\mathbb{Z}$. Then $$\gcd(\mathrm{lcm}(n,m),k)\pmod k=\left(s\left(\mathrm{lcm}(n,m)\right)+t\left(k\right)\right)\pmod k$$
gives $$\gcd(\mathrm{lcm}(n,m),k)\pmod k=s\left(\mathrm{lcm}(n,m)\right) \pmod k$$
I don't know what to do with the multiple of $s$ in the front on the right hand side. I've been told elsewhere that $n$ and $m$ divide $k$ by assumption (in the answer linked above) but that seems only true initially. We are considering the general case in which the powers $n$ and $m$ don't divide $k$, which I thought was the impetus for reducing via the gcd theorem: $\langle a^n\rangle=\langle a^{\gcd(n,k)}\rangle$ so that the power $\gcd(n,k)$ necessarily divides $k$.
Any help would be appreciated!