[proofplan]
We expand the Casimir element using the root space decomposition of $\mathfrak g$ and a Killing-dual choice of root vectors. After rewriting each positive-negative root contribution so that positive root vectors act on the right, we evaluate the resulting expression on a highest weight vector. The positive root terms vanish, the Cartan part gives $(\lambda,\lambda)$, and the commutator terms give $2(\lambda,\rho)$. Finally, centrality of the Casimir element makes this scalar action hold on the whole irreducible highest weight module.
[/proofplan]
[step:Choose Killing-dual bases adapted to the root decomposition]
Let $r:=\dim_{\mathbb C}\mathfrak h$, and choose a basis $(h_1,\dots,h_r)$ of $\mathfrak h$. Let $(k_1,\dots,k_r)$ be the $B$-[dual basis](/theorems/414) of $\mathfrak h$, so that
\begin{align*}
B(h_i,k_j)=\delta_{ij}
\end{align*}
for all $1\le i,j\le r$.
Let $\Phi:=\Phi^+\cup(-\Phi^+)$ be the full root system.
For each root $\alpha\in\Phi$, write
\begin{align*}
\mathfrak g_\alpha:=\{x\in\mathfrak g:[h,x]=\alpha(h)x\text{ for every }h\in\mathfrak h\}
\end{align*}
for the corresponding root space. The root-space theorem for finite-dimensional complex semisimple Lie algebras gives
\begin{align*}
\dim_{\mathbb C}\mathfrak g_\alpha=1
\end{align*}
for every $\alpha\in\Phi$ and the direct-sum decomposition
\begin{align*}
\mathfrak g=\mathfrak h\oplus\bigoplus_{\alpha\in\Phi}\mathfrak g_\alpha.
\end{align*}
The Killing form is orthogonal on root spaces unless the roots sum to zero: if $x\in\mathfrak g_\alpha$ and $y\in\mathfrak g_\beta$, invariance gives
\begin{align*}
(\alpha+\beta)(h)B(x,y)=B([h,x],y)+B(x,[h,y])=0
\end{align*}
for every $h\in\mathfrak h$, so $B(x,y)=0$ when $\alpha+\beta\ne 0$. Nondegeneracy of $B$ on $\mathfrak g$ therefore pairs each one-dimensional $\mathfrak g_\alpha$ nondegenerately with $\mathfrak g_{-\alpha}$.
For each $\alpha\in\Phi^+$, choose a nonzero vector $e_\alpha\in\mathfrak g_\alpha$. Since the Killing form pairs $\mathfrak g_\alpha$ nondegenerately with $\mathfrak g_{-\alpha}$, choose $f_\alpha\in\mathfrak g_{-\alpha}$ such that
\begin{align*}
B(e_\alpha,f_\alpha)=1.
\end{align*}
Then
\begin{align*}
(h_1,\dots,h_r,(e_\alpha)_{\alpha\in\Phi^+},(f_\alpha)_{\alpha\in\Phi^+})
\end{align*}
is a basis of $\mathfrak g$ adapted to the decomposition
\begin{align*}
\mathfrak g=\mathfrak h\oplus\bigoplus_{\alpha\in\Phi^+}\mathfrak g_\alpha\oplus\bigoplus_{\alpha\in\Phi^+}\mathfrak g_{-\alpha}.
\end{align*}
Its $B$-dual basis consists of
\begin{align*}
(k_1,\dots,k_r,(f_\alpha)_{\alpha\in\Phi^+},(e_\alpha)_{\alpha\in\Phi^+}).
\end{align*}
Therefore the Casimir element has the expansion
\begin{align*}
\Omega_B=\sum_{i=1}^r h_i k_i+\sum_{\alpha\in\Phi^+}(e_\alpha f_\alpha+f_\alpha e_\alpha).
\end{align*}
[/step]
[step:Move all positive root vectors to the right]
For each $\alpha\in\Phi^+$, the defining relation in the enveloping algebra gives
\begin{align*}
e_\alpha f_\alpha=f_\alpha e_\alpha+[e_\alpha,f_\alpha].
\end{align*}
Substituting this identity into the root contribution to $\Omega_B$ gives
\begin{align*}
\Omega_B=\sum_{i=1}^r h_i k_i+\sum_{\alpha\in\Phi^+}\bigl(2f_\alpha e_\alpha+[e_\alpha,f_\alpha]\bigr).
\end{align*}
[guided]
The point of this rewriting is to prepare the Casimir element for evaluation on a highest weight vector. Positive root vectors annihilate such a vector, but this is useful only when the positive root vector stands on the right.
For a fixed positive root $\alpha\in\Phi^+$, the vectors $e_\alpha\in\mathfrak g_\alpha$ and $f_\alpha\in\mathfrak g_{-\alpha}$ are elements of $U(\mathfrak g)$. The universal enveloping algebra relation says that, for $x,y\in\mathfrak g$,
\begin{align*}
xy-yx=[x,y].
\end{align*}
Applying this with $x=e_\alpha$ and $y=f_\alpha$, we get
\begin{align*}
e_\alpha f_\alpha=f_\alpha e_\alpha+[e_\alpha,f_\alpha].
\end{align*}
The Casimir expansion from the previous step contains both ordered products $e_\alpha f_\alpha$ and $f_\alpha e_\alpha$. Replacing only the first one gives
\begin{align*}
e_\alpha f_\alpha+f_\alpha e_\alpha
=
f_\alpha e_\alpha+[e_\alpha,f_\alpha]+f_\alpha e_\alpha
=
2f_\alpha e_\alpha+[e_\alpha,f_\alpha].
\end{align*}
Summing this identity over all positive roots gives
\begin{align*}
\Omega_B=\sum_{i=1}^r h_i k_i+\sum_{\alpha\in\Phi^+}\bigl(2f_\alpha e_\alpha+[e_\alpha,f_\alpha]\bigr).
\end{align*}
This is the exact form needed: each term $f_\alpha e_\alpha$ has $e_\alpha$ acting first on a module vector.
[/guided]
[/step]
[step:Identify the root commutators with the Killing-form elements $h_\alpha$]
For each $\alpha\in\Phi^+$, the commutator $[e_\alpha,f_\alpha]$ belongs to $\mathfrak h$. We claim that
\begin{align*}
[e_\alpha,f_\alpha]=h_\alpha,
\end{align*}
where $h_\alpha\in\mathfrak h$ is defined by $B(h_\alpha,h)=\alpha(h)$ for every $h\in\mathfrak h$.
Indeed, for every $h\in\mathfrak h$, [invariance of the Killing form](/theorems/3808) gives
\begin{align*}
B([e_\alpha,f_\alpha],h)=B(e_\alpha,[f_\alpha,h]).
\end{align*}
Since $f_\alpha\in\mathfrak g_{-\alpha}$, we have $[h,f_\alpha]=-\alpha(h)f_\alpha$, hence $[f_\alpha,h]=\alpha(h)f_\alpha$. Therefore
\begin{align*}
B([e_\alpha,f_\alpha],h)=B(e_\alpha,\alpha(h)f_\alpha)=\alpha(h)B(e_\alpha,f_\alpha)=\alpha(h).
\end{align*}
By the defining uniqueness of $h_\alpha$, this proves $[e_\alpha,f_\alpha]=h_\alpha$.
[/step]
[step:Evaluate the rewritten Casimir element on a highest weight vector]
Let $0\ne v_\lambda\in L(\lambda)$ be a highest weight vector of weight $\lambda$. Thus
\begin{align*}
h v_\lambda=\lambda(h)v_\lambda
\end{align*}
for every $h\in\mathfrak h$, and
\begin{align*}
xv_\lambda=0
\end{align*}
for every $x\in\mathfrak g_\alpha$ with $\alpha\in\Phi^+$.
Using the rewritten expression for $\Omega_B$, we obtain
\begin{align*}
\Omega_B v_\lambda
=
\sum_{i=1}^r h_i k_i v_\lambda
+
\sum_{\alpha\in\Phi^+}\bigl(2f_\alpha e_\alpha+[e_\alpha,f_\alpha]\bigr)v_\lambda.
\end{align*}
Since $e_\alpha v_\lambda=0$, each term $f_\alpha e_\alpha v_\lambda$ is zero. Since $[e_\alpha,f_\alpha]=h_\alpha$, the root contribution becomes
\begin{align*}
\sum_{\alpha\in\Phi^+}[e_\alpha,f_\alpha]v_\lambda
=
\sum_{\alpha\in\Phi^+}h_\alpha v_\lambda
=
\sum_{\alpha\in\Phi^+}\lambda(h_\alpha)v_\lambda.
\end{align*}
By the definition of the [bilinear form](/page/Bilinear%20Form) on $\mathfrak h^*$,
\begin{align*}
\lambda(h_\alpha)=B(h_\lambda,h_\alpha)=(\lambda,\alpha).
\end{align*}
Therefore the root contribution is
\begin{align*}
\sum_{\alpha\in\Phi^+}(\lambda,\alpha)v_\lambda=2(\lambda,\rho)v_\lambda.
\end{align*}
It remains to compute the Cartan contribution. Since each $k_i$ acts on $v_\lambda$ by the scalar $\lambda(k_i)$, we have
\begin{align*}
\sum_{i=1}^r h_i k_i v_\lambda
=
\sum_{i=1}^r \lambda(k_i)\lambda(h_i)v_\lambda.
\end{align*}
The element $\sum_{i=1}^r \lambda(k_i)h_i\in\mathfrak h$ has the same $B$-pairing with every $h\in\mathfrak h$ as $h_\lambda$, hence equals $h_\lambda$. Thus
\begin{align*}
\sum_{i=1}^r \lambda(k_i)\lambda(h_i)=\lambda(h_\lambda)=B(h_\lambda,h_\lambda)=(\lambda,\lambda).
\end{align*}
Combining the Cartan and root contributions gives
\begin{align*}
\Omega_B v_\lambda=\bigl((\lambda,\lambda)+2(\lambda,\rho)\bigr)v_\lambda=(\lambda,\lambda+2\rho)v_\lambda.
\end{align*}
[/step]
[step:Extend the scalar action from the highest weight vector to all of $L(\lambda)$]
[claim:The Killing-form Casimir element is central]
For any basis $(z_a)$ of $\mathfrak g$ with $B$-dual basis $(w_a)$, the element
\begin{align*}
\sum_a z_a w_a\in U(\mathfrak g)
\end{align*}
commutes with every element of $\mathfrak g$.
[/claim]
[proof]
Fix $y\in\mathfrak g$, and write
\begin{align*}
[y,z_a]=\sum_b A_{ba}z_b.
\end{align*}
Invariance of $B$ gives
\begin{align*}
B([y,w_a],z_c)=-B(w_a,[y,z_c])=-A_{ac}.
\end{align*}
Since $(w_c)$ is the $B$-dual basis to $(z_c)$, this says
\begin{align*}
[y,w_a]=-\sum_c A_{ac}w_c.
\end{align*}
Thus the commutator in $U(\mathfrak g)$ is
\begin{align*}
\left[y,\sum_a z_a w_a\right]
=\sum_{a,b}A_{ba}z_bw_a-\sum_{a,c}A_{ac}z_aw_c=0,
\end{align*}
after relabelling the dummy indices in the two sums. Therefore the Casimir element commutes with every $y\in\mathfrak g$, and hence lies in the center of $U(\mathfrak g)$.
[/proof]
Applying the claim to the Killing-dual basis used to define $\Omega_B$, the element $\Omega_B$ is central in $U(\mathfrak g)$. Since $L(\lambda)$ is irreducible and $v_\lambda\ne 0$, the $U(\mathfrak g)$-submodule generated by $v_\lambda$ is all of $L(\lambda)$.
Let $u\in U(\mathfrak g)$ be arbitrary. Using centrality of $\Omega_B$ and the calculation on $v_\lambda$, we get
\begin{align*}
\Omega_B(u v_\lambda)=u\Omega_B v_\lambda=u\bigl((\lambda,\lambda+2\rho)v_\lambda\bigr)=(\lambda,\lambda+2\rho)u v_\lambda.
\end{align*}
Every element of $L(\lambda)$ is a finite sum of vectors of the form $u v_\lambda$ with $u\in U(\mathfrak g)$. Hence $\Omega_B$ acts on all of $L(\lambda)$ by the scalar
\begin{align*}
(\lambda,\lambda+2\rho).
\end{align*}
This proves the formula.
[/step]