2. As shown in Figure 1, the hyperbola $y=\frac{k}{x}(k>0, x>0)$ intersects the sides
$C B$ and $B A$ of rectangle $O A B C$
at points $E$ and $F$, respectively, and $A E$
$=\lambda A B$, connecting $E F$.
Then $\frac{S_{\triangle B E F}}{S_{\triangle O E F}}=(\quad)$.
(A) $\frac{\lambda}{1-\lambda}$
(B) $\frac{\lambda}{1+\lambda}$
(C) $\frac{1+\lambda}{1-\lambda}$
(D) $\frac{1-\lambda}{1+\lambda}$
2. D.

Let point $B(b, a)$. Then point $E(\lambda b, a), F(b, \lambda a)$.
Thus, $B E=b(1-\lambda), B F=a(1-\lambda)$.
Since point $F$ is on the hyperbola, we have $a b=\frac{k}{\lambda}$.
Therefore, $S_{\triangle O E F}=S_{\text {rectangle } O A B C}-S_{\triangle O A F}-S_{\triangle O C E}-S_{\triangle B E F}$
$$
\begin{array}{l}
=a b-\frac{1}{2} k-\frac{1}{2} k-\frac{1}{2} a b(1-\lambda)^{2} \\
=\frac{k}{\lambda}-k-\frac{k}{2 \lambda}(1-\lambda)^{2}=\frac{k(1-\lambda)(1+\lambda)}{2 \lambda} .
\end{array}
$$

Thus, $\frac{S_{\triangle B E F}}{S_{\triangle O E F}}=\frac{1-\lambda}{1+\lambda}$.