[proofplan]
The proof identifies the Casimir operator as the image under $\rho \otimes \rho$ of the canonical tensor $\Omega=\sum_i x_i \otimes y_i$ determined by the Killing form. We first prove that $\Omega$ is invariant under the diagonal adjoint action of $\mathfrak g$, using the invariance and nondegeneracy of the Killing form. Applying the representation $\rho$ to this tensor identity gives exactly the commutator identity $[\rho(z),C_V]=0$.
[/proofplan]
[step:Define the canonical tensor determined by the Killing form]
Let $n := \dim_K \mathfrak g$. Define the tensor
\begin{align*}
\Omega := \sum_{i=1}^n x_i \otimes y_i \in \mathfrak g \otimes_K \mathfrak g.
\end{align*}
Since $(x_i)_{i=1}^n$ and $(y_i)_{i=1}^n$ are $\kappa$-dual bases, every $u \in \mathfrak g$ has the expansions
\begin{align*}
u = \sum_{i=1}^n \kappa(u,y_i)x_i
\qquad\text{and}\qquad
u = \sum_{i=1}^n \kappa(x_i,u)y_i.
\end{align*}
[/step]
[step:Prove the canonical tensor is invariant under the diagonal adjoint action]
Fix $z \in \mathfrak g$. We prove
\begin{align*}
\sum_{i=1}^n [z,x_i]\otimes y_i+\sum_{i=1}^n x_i\otimes [z,y_i]=0
\end{align*}
in $\mathfrak g \otimes_K \mathfrak g$.
Let $a,b \in \mathfrak g$. Pair the displayed tensor with $a \otimes b$ through the nondegenerate [bilinear form](/page/Bilinear%20Form)
\begin{align*}
(\mathfrak g \otimes_K \mathfrak g)\times(\mathfrak g \otimes_K \mathfrak g) &\to K,\\
(u_1\otimes u_2,\ v_1\otimes v_2) &\mapsto \kappa(u_1,v_1)\kappa(u_2,v_2).
\end{align*}
The pairing gives
\begin{align*}
&\sum_{i=1}^n \kappa([z,x_i],a)\kappa(y_i,b)
+\sum_{i=1}^n \kappa(x_i,a)\kappa([z,y_i],b).
\end{align*}
The Killing form is invariant, so for all $r,s,t \in \mathfrak g$,
\begin{align*}
\kappa([r,s],t)+\kappa(s,[r,t])=0.
\end{align*}
Using this first with $(r,s,t)=(z,x_i,a)$ and then with $(r,s,t)=(z,y_i,b)$, the pairing becomes
\begin{align*}
&-\sum_{i=1}^n \kappa(x_i,[z,a])\kappa(y_i,b)
-\sum_{i=1}^n \kappa(x_i,a)\kappa(y_i,[z,b]).
\end{align*}
By the dual-basis expansions, the first sum is $\kappa([z,a],b)$ and the second sum is $\kappa(a,[z,b])$. Hence the pairing equals
\begin{align*}
-\kappa([z,a],b)-\kappa(a,[z,b])=0
\end{align*}
again by invariance of $\kappa$. Since $a,b \in \mathfrak g$ were arbitrary and the induced tensor pairing is nondegenerate, the tensor identity follows.
[guided]
Fix $z \in \mathfrak g$. The tensor $\Omega=\sum_i x_i\otimes y_i$ should be thought of as the inverse of the Killing form. To prove that it is invariant, we must show that applying $\operatorname{ad}z$ to the first tensor factor cancels applying $\operatorname{ad}z$ to the second tensor factor:
\begin{align*}
\sum_{i=1}^n [z,x_i]\otimes y_i+\sum_{i=1}^n x_i\otimes [z,y_i]=0.
\end{align*}
Because $\kappa$ is nondegenerate, it induces a nondegenerate pairing on $\mathfrak g\otimes_K\mathfrak g$ by
\begin{align*}
(u_1\otimes u_2,\ v_1\otimes v_2) \mapsto \kappa(u_1,v_1)\kappa(u_2,v_2).
\end{align*}
Thus it is enough to pair the tensor above against an arbitrary elementary tensor $a\otimes b$, where $a,b\in\mathfrak g$, and prove that the result is zero.
The pairing is
\begin{align*}
&\sum_{i=1}^n \kappa([z,x_i],a)\kappa(y_i,b)
+\sum_{i=1}^n \kappa(x_i,a)\kappa([z,y_i],b).
\end{align*}
The key input is [invariance of the Killing form](/theorems/3808):
\begin{align*}
\kappa([r,s],t)+\kappa(s,[r,t])=0
\end{align*}
for all $r,s,t\in\mathfrak g$. Applying this with $(r,s,t)=(z,x_i,a)$ gives
\begin{align*}
\kappa([z,x_i],a)=-\kappa(x_i,[z,a]),
\end{align*}
and applying it with $(r,s,t)=(z,y_i,b)$ gives
\begin{align*}
\kappa([z,y_i],b)=-\kappa(y_i,[z,b]).
\end{align*}
Therefore the pairing becomes
\begin{align*}
&-\sum_{i=1}^n \kappa(x_i,[z,a])\kappa(y_i,b)
-\sum_{i=1}^n \kappa(x_i,a)\kappa(y_i,[z,b]).
\end{align*}
Now we use the dual-basis identities. Since $(x_i)$ and $(y_i)$ are dual with respect to $\kappa$,
\begin{align*}
[z,a]=\sum_{i=1}^n \kappa(x_i,[z,a])y_i,
\qquad
a=\sum_{i=1}^n \kappa(x_i,a)y_i.
\end{align*}
Pairing these expansions with $b$ and $[z,b]$ respectively gives
\begin{align*}
\sum_{i=1}^n \kappa(x_i,[z,a])\kappa(y_i,b)=\kappa([z,a],b),
\end{align*}
and
\begin{align*}
\sum_{i=1}^n \kappa(x_i,a)\kappa(y_i,[z,b])=\kappa(a,[z,b]).
\end{align*}
Thus the original pairing equals
\begin{align*}
-\kappa([z,a],b)-\kappa(a,[z,b]).
\end{align*}
This is zero by the same invariance identity for $\kappa$. Since every pairing against $a\otimes b$ is zero and the tensor pairing is nondegenerate, the tensor itself is zero.
[/guided]
[/step]
[step:Expand the commutator of the representation with the Casimir operator]
For the fixed $z \in \mathfrak g$, compute the commutator in $\operatorname{End}_K(V)$:
\begin{align*}
[\rho(z),C_V]
&= \rho(z)\sum_{i=1}^n \rho(x_i)\rho(y_i)-\sum_{i=1}^n \rho(x_i)\rho(y_i)\rho(z)\\
&= \sum_{i=1}^n \bigl(\rho(z)\rho(x_i)-\rho(x_i)\rho(z)\bigr)\rho(y_i)
+\sum_{i=1}^n \rho(x_i)\bigl(\rho(z)\rho(y_i)-\rho(y_i)\rho(z)\bigr).
\end{align*}
Since $\rho: \mathfrak g \to \mathfrak{gl}(V)$ is a Lie algebra representation,
\begin{align*}
\rho([u,v])=\rho(u)\rho(v)-\rho(v)\rho(u)
\end{align*}
for all $u,v \in \mathfrak g$. Hence
\begin{align*}
[\rho(z),C_V]
=
\sum_{i=1}^n \rho([z,x_i])\rho(y_i)
+\sum_{i=1}^n \rho(x_i)\rho([z,y_i]).
\end{align*}
[/step]
[step:Apply the invariant tensor identity to obtain centrality]
Define the bilinear map
\begin{align*}
m_\rho: \mathfrak g \otimes_K \mathfrak g &\to \operatorname{End}_K(V),\\
u\otimes v &\mapsto \rho(u)\rho(v).
\end{align*}
Applying $m_\rho$ to the tensor identity
\begin{align*}
\sum_{i=1}^n [z,x_i]\otimes y_i+\sum_{i=1}^n x_i\otimes [z,y_i]=0
\end{align*}
gives
\begin{align*}
\sum_{i=1}^n \rho([z,x_i])\rho(y_i)
+\sum_{i=1}^n \rho(x_i)\rho([z,y_i])
=0.
\end{align*}
By the commutator expansion from the previous step, this says
\begin{align*}
[\rho(z),C_V]=0.
\end{align*}
Equivalently,
\begin{align*}
\rho(z)C_V=C_V\rho(z).
\end{align*}
Since $z \in \mathfrak g$ was arbitrary, $C_V$ commutes with the action of every element of $\mathfrak g$.
[/step]