[guided]Fix arbitrary elements $x,y,z \in \mathfrak g$. The tool that relates the nested bracket $[z,[x,y]]$ to brackets visibly lying in the derived algebra is the Jacobi identity. Applied to the ordered triple $(z,x,y)$, it states that
\begin{align*}
[z,[x,y]] + [x,[y,z]] + [y,[z,x]] = 0.
\end{align*}
Solving this identity for the first term gives
\begin{align*}
[z,[x,y]] = -[x,[y,z]] - [y,[z,x]].
\end{align*}
Now we check that the right-hand side belongs to the derived algebra. Since $y,z \in \mathfrak g$ and the bracket is a map $[\cdot,\cdot]:\mathfrak g \times \mathfrak g \to \mathfrak g$, the element $[y,z]$ lies in $\mathfrak g$. Hence $[x,[y,z]]$ is a bracket of two elements of $\mathfrak g$, so by the definition of $\mathfrak h$ it lies in
\begin{align*}
\mathfrak h = \operatorname{span}_k\{[u,v] : u,v \in \mathfrak g\}.
\end{align*}
Similarly, $[z,x] \in \mathfrak g$, so $[y,[z,x]]$ is also a bracket of two elements of $\mathfrak g$ and therefore lies in $\mathfrak h$.
Because $\mathfrak h$ is a vector subspace, it is closed under scalar multiplication by $-1$ and under addition. Therefore
\begin{align*}
-[x,[y,z]] - [y,[z,x]] \in \mathfrak h.
\end{align*}
Using the Jacobi identity equality above, this proves $[z,[x,y]] \in \mathfrak h$.[/guided]