How to prove that $[Z,\rho(A)]=0$ for all $A \in\mathfrak{sl}(2,\mathbb{C})$ and $Z$ is the Casimir operator. Let $\rho:\mathfrak{sl}(2,\mathbb{C}) \to \mathfrak{gl}(V)$ be a finite-dimensional representation. Define the Casimir operator
$$
Z = \frac{1}{2}\rho(H)^2+\rho(H)+2\rho(Y)\rho(X)
$$
where $H$, $X$, $Y$ is the basis
$$
H = \begin{pmatrix}1 & 0 \\ 0 & -1\end{pmatrix}, \quad X = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, \quad Y = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}
$$
satisfying
$$
[H,X]=2X,\quad [H,Y]=-2Y \quad, [X,Y]=H.
$$
How to show that for all $A \in \mathfrak{sl}(2,\mathbb{C})$, we have
$$
[Z,\rho(A)]=0?
$$

I want to use the fact that $\rho$ is a Lie algebra homomorphism (bracket-preserving), but there is a square and multiplication instead of bracket in $Z$, so we can't do it. If $\rho$ is faithful or simply the identity, things might be easier, but we don't have such information. Is there other properties of Lie algebra representation that I'm missing?

Well I found the answer, but I think it is a good idea to post it here to increase its reachability: Turn to lemma 4.3.2
