2. Real numbers $a, b, c$ and a positive number $\lambda$ make $f(x)=x^{3}+a x^{2}+b x+c$ have three real roots $x_{1}, x_{2}, x_{3}$, and satisfy
(1) $x_{2}-x_{1}=\lambda$;
(2) $x_{3}>\frac{1}{2}\left(x_{1}+x_{2}\right)$.
Find the maximum value of $\frac{2 a^{3}+27 c-9 a b}{\lambda^{3}}$.
$$
\begin{array}{l}
2 a^{3}+27 c-9 a b=27\left[\left(-\frac{a}{3}\right)^{3}+a \cdot\left(-\frac{a}{3}\right)^{2}+b \cdot\left(-\frac{a}{3}\right)+c\right]=27 f\left(-\frac{a}{3}\right) \\
=27\left(-\frac{a}{3}-x_{1}\right)\left(-\frac{a}{3}-x_{2}\right)\left(-\frac{a}{3}-x_{3}\right)=-\left(a+3 x_{1}\right)\left(a+3 x_{2}\right)\left(a+3 x_{3}\right) \\
=-\left(2 x_{1}-x_{2}-x_{3}\right)\left(2 x_{2}-x_{1}-x_{3}\right)\left(2 x_{3}-x_{1}-x_{2}\right) \\
=-\left[\left(x_{1}-x_{2}\right)+\left(x_{1}-x_{3}\right)\right]\left[2\left(x_{2}-x_{1}\right)+\left(x_{1}-x_{3}\right)\right]\left[\left(x_{1}-x_{2}\right)+2\left(x_{3}-x_{1}\right)\right] \\
\xlongequal{t=x_{3}-x_{1}}-(\lambda+t)(2 \lambda-t)(\lambda-2 t)=-2 \lambda^{3}+3 \lambda^{2} t+3 \lambda t^{2}-2 t^{3}, \\
\text { then } \frac{2 a^{3}+27 c-9 a b}{\lambda^{3}}=-2\left(\frac{t}{\lambda}\right)^{3}+3\left(\frac{t}{\lambda}\right)^{2}+3\left(\frac{t}{\lambda}\right)-2 . \\
\text { By } x_{3}>\frac{1}{2}\left(x_{1}+x_{2}\right) \Rightarrow x_{3}-x_{1}>\frac{1}{2}\left(x_{2}-x_{1}\right) \Rightarrow t>\frac{1}{2} \lambda \Rightarrow \frac{t}{\lambda}>\frac{1}{2} ｝
\end{array}
$$

Let $x=t \lambda>\frac{1}{2}, g(x)=-2 x^{3}+3 x^{2}+3 x-2$, then $g^{\prime}(x)=-6 x^{2}+6 x+3$ $=-3\left(2 x^{2}-2 x-1\right) \Rightarrow g(x)$ is monotonically increasing on $\left(\frac{1}{2}, \frac{1+\sqrt{3}}{2}\right)$ and monotonically decreasing on $\left(\frac{1+\sqrt{3}}{2},+\infty\right)$, thus $g(x)_{\max }=g\left(\frac{1+\sqrt{3}}{2}\right)=\frac{3 \sqrt{3}}{2}$.
Therefore, the maximum value of $\frac{2 a^{3}+27 c-9 a b}{\lambda^{3}}$ is $\frac{3 \sqrt{3}}{2}$.