The proof is by contradiction and begins by assuming $\operatorname{cf}(\lambda^{\kappa})\leq\kappa$, where $\kappa$ is an infinite cardinal and $\lambda\geq 2$.
The line in question follows:
$\lambda^{\kappa}\lt(\lambda^{\kappa})^{\operatorname{cf}(\lambda^{\kappa})}\leq(\lambda^{\kappa})^{\kappa}=\lambda^{\kappa^{2}}=\lambda^{\kappa}$ giving a contradiction.
My question is:
With the assumption $\operatorname{cf}(\lambda^{\kappa})\leq\kappa$, then does not $(\lambda^{\kappa})^{\operatorname{cf}(\lambda^{\kappa})}=\lambda^{\kappa}$,
making all the terms equal, and thus not give a contradiction?
Thanks
Recall König's theorem which tells us that for any infinite cardinal $\mu$: $$\mu<\mu^{\operatorname{cf}(\mu)}.$$