Your issue seems to be this basic number theory result:
For integer $m,n,b$ if $mn$ is a multiple of $b$ then $m$ is a multiple of $\frac b{\gcd(b,n)}$ and $n$ is a multiple of $\frac b{\gcd(b,m)}$.
This very easy to verify. If $mn$ is a multiple of $b$ then
$mn = kb$ for some integer $k$.
Now $\gcd(b,n)$ divides both $b$ and $n$ so we can divide both sides by $\gcd(b,n)$ to get
$m[\frac {n}{\gcd(b,n)}] = k[\frac b{\gcd(b,n)}]$
(Note: even though the values written in the square brackets are written as fractions, they are, of course, integers and the denominators do divide the numerators.)
Now as all are integers these means $[\frac{n}{\gcd(b,n)}]$ divides $k[\frac b{\gcd(b,n)}]$. But $[\frac{n}{\gcd(b,n)}]$ and $[\frac b{\gcd(b,n)}]$ are relatively prime integers, we must have that $[\frac{n}{\gcd(b,n)}]$ divides $k$[*].
So we can divide both sides by $[\frac{n}{\gcd(b,n)}]$ to get
$m = [\frac k{[\frac{n}{\gcd(b,n)}]}][\frac{n}{\gcd(b,n)}]$
.... and that's that. $[\frac k{[\frac{n}{\gcd(b,n)}]}]$ is an integer and so $m$ is a multiple of $[\frac{n}{\gcd(b,n)}]$.
.....
From that the proof follows straightforwardly:
$a^k\equiv 1$ if and only if $k$ is a multiple of $\lambda$.
So $(a^e)^f=a^{ef}\equiv 1$ if and only if $ef$ is a multiple of $\lambda$.
So as $ef$ is a multiple of $\lambda$, we just proved that that means $f$ must be a multiple of $\frac {\lambda}{\gcd(\lambda, e)}$.
That's it.
........
[*] I hope you are familiar with this more basic number theory result:
For integers $a,b,k$, if $b$ divides $ak$ but $\gcd(b,k)=1$ then $b$ divides $a$.
This result should be intuitively obvious as all the divisors of $b$ divide into $ak$ but none of the divisors have anything in common with $b$ (which is relatively prime to $a$) so all the divisors of $b$ must divide into $k$.
More formally: If $b = \prod p_i^{m_i}$ is the unique prime factorisation of $b$ and than as $\gcd(a,b) =1$ non of the $p_i^{m_i}$ divide $ak$. But as $b$ and $k$ are relatively prime no $p_i$ can divide $k$ so by Euclid's Lemma $p_i^{m_i}|a$. So $b = \prod p_i^{m_i}|a$.