[proofplan]
The derived algebra is already a vector subspace by definition, so the only point is stability under bracketing with arbitrary elements of $\mathfrak g$. Since every element of $[\mathfrak g,\mathfrak g]$ is a finite linear combination of brackets $[x,y]$, bilinearity reduces the argument to a single bracket generator. The Jacobi identity rewrites $[z,[x,y]]$ as a sum of brackets of elements of $\mathfrak g$, hence as an element of the span defining $[\mathfrak g,\mathfrak g]$.
[/proofplan]
[step:Reduce ideal stability to bracket generators]
Let $\mathfrak h := [\mathfrak g,\mathfrak g]$. By definition,
\begin{align*}
\mathfrak h = \operatorname{span}_k\{[x,y] : x,y \in \mathfrak g\},
\end{align*}
so $\mathfrak h$ is a $k$-linear subspace of $\mathfrak g$.
To prove that $\mathfrak h$ is an ideal, it remains to prove that $[z,w] \in \mathfrak h$ for every $z \in \mathfrak g$ and every $w \in \mathfrak h$. Fix $z \in \mathfrak g$ and $w \in \mathfrak h$. Since $w$ lies in the span defining $\mathfrak h$, there exist an integer $m \geq 1$, scalars $a_1,\dots,a_m \in k$, and elements $x_1,\dots,x_m,y_1,\dots,y_m \in \mathfrak g$ such that
\begin{align*}
w = \sum_{i=1}^{m} a_i [x_i,y_i].
\end{align*}
Using bilinearity of the Lie bracket in the second argument,
\begin{align*}
[z,w] = \sum_{i=1}^{m} a_i [z,[x_i,y_i]].
\end{align*}
Thus it suffices to prove that $[z,[x,y]] \in \mathfrak h$ for arbitrary $x,y,z \in \mathfrak g$.
[guided]
Let $\mathfrak h := [\mathfrak g,\mathfrak g]$. The phrase “$\mathfrak h$ is an ideal” has two parts: first $\mathfrak h$ must be a vector subspace of $\mathfrak g$, and second it must be stable under bracketing with elements of $\mathfrak g$. The first part is built into the definition, because
\begin{align*}
\mathfrak h = \operatorname{span}_k\{[x,y] : x,y \in \mathfrak g\}.
\end{align*}
A span is a $k$-linear subspace.
Now fix an element $z \in \mathfrak g$. To check stability under bracketing with $z$, take an arbitrary element $w \in \mathfrak h$. Since $w$ belongs to a span, it is a finite $k$-linear combination of generators of that span. Thus there exist an integer $m \geq 1$, scalars $a_1,\dots,a_m \in k$, and elements $x_1,\dots,x_m,y_1,\dots,y_m \in \mathfrak g$ such that
\begin{align*}
w = \sum_{i=1}^{m} a_i [x_i,y_i].
\end{align*}
The Lie bracket is bilinear, so bracketing this expression with $z$ gives
\begin{align*}
[z,w] = \left[z,\sum_{i=1}^{m} a_i [x_i,y_i]\right]
= \sum_{i=1}^{m} a_i [z,[x_i,y_i]].
\end{align*}
Therefore the whole problem reduces to checking one generator: for arbitrary $x,y,z \in \mathfrak g$, we must prove that $[z,[x,y]]$ lies in $\mathfrak h$.
[/guided]
[/step]
[step:Use the Jacobi identity to keep each generator inside the derived algebra]
Let $x,y,z \in \mathfrak g$. The Jacobi identity for the triple $(z,x,y)$ gives
\begin{align*}
[z,[x,y]] + [x,[y,z]] + [y,[z,x]] = 0.
\end{align*}
Hence
\begin{align*}
[z,[x,y]] = -[x,[y,z]] - [y,[z,x]].
\end{align*}
Since $[y,z] \in \mathfrak g$ and $[z,x] \in \mathfrak g$, both $[x,[y,z]]$ and $[y,[z,x]]$ are brackets of two elements of $\mathfrak g$. Therefore each belongs to $\mathfrak h = [\mathfrak g,\mathfrak g]$. Because $\mathfrak h$ is a vector subspace, their linear combination
\begin{align*}
-[x,[y,z]] - [y,[z,x]]
\end{align*}
also belongs to $\mathfrak h$. Thus $[z,[x,y]] \in \mathfrak h$.
[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]
[/step]
[step:Conclude stability under arbitrary elements]
Returning to the representation
\begin{align*}
[z,w] = \sum_{i=1}^{m} a_i [z,[x_i,y_i]],
\end{align*}
the previous step shows that every summand $[z,[x_i,y_i]]$ lies in $\mathfrak h$. Since $\mathfrak h$ is a vector subspace, the finite linear combination $[z,w]$ lies in $\mathfrak h$. Therefore $[\mathfrak g,\mathfrak h] \subseteq \mathfrak h$, so $\mathfrak h = [\mathfrak g,\mathfrak g]$ is an ideal of $\mathfrak g$.
[/step]