[guided]The purpose of this step is to prove the non-strict inequality
\begin{align*}
\sum_{i \in I}\kappa_i \leq \prod_{i \in I}\lambda_i.
\end{align*}
Since we are using explicit representatives, it is enough to build an injection $S \to P$.
Because $\kappa_i < \lambda_i$, the ordinal $\lambda_i$ is nonzero for every $i \in I$, so every coordinate set $\lambda_i$ contains $0$. We encode an element $(i,\alpha)$ of the disjoint union by a function that is zero everywhere except at the $i$th coordinate. At the $i$th coordinate we use $\alpha + 1$ rather than $\alpha$, so that different summands cannot collide at the all-zero function. Define
\begin{align*}
E: S &\to P \\
(i,\alpha) &\mapsto E(i,\alpha),
\end{align*}
where
\begin{align*}
E(i,\alpha)(j) :=
\begin{cases}
\alpha + 1, & j = i,\\
0, & j \neq i.
\end{cases}
\end{align*}
This function belongs to $P$: for $j \neq i$ we have $0 \in \lambda_j$, while for $j = i$ the inequality $\alpha \in \kappa_i$ implies $\alpha + 1 \leq \kappa_i < \lambda_i$, so $\alpha + 1 \in \lambda_i$.
Now suppose $E(i,\alpha) = E(j,\beta)$. If $i \neq j$, then evaluating both functions at the coordinate $i$ gives
\begin{align*}
\alpha + 1 = E(i,\alpha)(i) = E(j,\beta)(i) = 0,
\end{align*}
contradicting the fact that $\alpha + 1$ is a successor ordinal and hence nonzero. Therefore $i = j$. Evaluating at this same index gives $\alpha + 1 = \beta + 1$, and cancellation of ordinal successors gives $\alpha = \beta$. Thus $E$ is injective, and so $|S| \leq |P|$.[/guided]