[proofplan]
View $\mathfrak g$ as a $\mathfrak g$-module under the adjoint representation. The hypothesis that $\mathfrak a$ is an ideal is exactly the assertion that $\mathfrak a$ is a $\mathfrak g$-submodule of this adjoint module. [Weyl's complete reducibility theorem](/theorems/3755) then supplies a $\mathfrak g$-stable vector-space complement $\mathfrak b$, and $\mathfrak g$-stability under the adjoint action is exactly the condition that $\mathfrak b$ is an ideal.
[/proofplan]
[step:Identify ideals with submodules of the adjoint module]
Let $\mathfrak{gl}(\mathfrak g)$ denote the Lie algebra of all $F$-linear maps $\mathfrak g \to \mathfrak g$, with Lie bracket given by the commutator. Define the adjoint representation
\begin{align*}
\operatorname{ad}: \mathfrak g &\to \mathfrak{gl}(\mathfrak g) \\
x &\mapsto \operatorname{ad}_x
\end{align*}
where
\begin{align*}
\operatorname{ad}_x: \mathfrak g &\to \mathfrak g \\
y &\mapsto [x,y].
\end{align*}
This makes the underlying $F$-[vector space](/page/Vector%20Space) of $\mathfrak g$ into a finite-dimensional $\mathfrak g$-module.
Since $\mathfrak a \trianglelefteq \mathfrak g$, for every $x \in \mathfrak g$ and every $y \in \mathfrak a$ one has
\begin{align*}
\operatorname{ad}_x(y) = [x,y] \in \mathfrak a.
\end{align*}
Thus $\mathfrak a$ is a $\mathfrak g$-submodule of the adjoint $\mathfrak g$-module $\mathfrak g$.
[guided]
The adjoint representation is the natural way for a Lie algebra to act on itself. For each $x \in \mathfrak g$, the [linear map](/page/Linear%20Map) $\operatorname{ad}_x: \mathfrak g \to \mathfrak g$ is defined by $y \mapsto [x,y]$. Therefore a subspace $W \subseteq \mathfrak g$ is stable under the adjoint action precisely when
\begin{align*}
[x,w] \in W
\end{align*}
for every $x \in \mathfrak g$ and every $w \in W$.
Applying this to $W = \mathfrak a$, the assumption $\mathfrak a \trianglelefteq \mathfrak g$ says exactly that
\begin{align*}
[\mathfrak g,\mathfrak a] \subseteq \mathfrak a.
\end{align*}
Equivalently, $\operatorname{ad}_x(\mathfrak a) \subseteq \mathfrak a$ for every $x \in \mathfrak g$. Hence $\mathfrak a$ is a $\mathfrak g$-submodule of the adjoint module $\mathfrak g$.
[/guided]
[/step]
[step:Apply complete reducibility to split the adjoint module]
Because $F$ is algebraically closed of characteristic $0$, $\mathfrak g$ is finite-dimensional and semisimple over $F$, and the adjoint module $\mathfrak g$ is finite-dimensional, [Weyl's Complete Reducibility Theorem](/theorems/???) applies to the inclusion of $\mathfrak g$-modules $\mathfrak a \subseteq \mathfrak g$. Hence there exists a $\mathfrak g$-submodule $\mathfrak b \subseteq \mathfrak g$ such that
\begin{align*}
\mathfrak g = \mathfrak a \oplus \mathfrak b
\end{align*}
as $F$-vector spaces.
[guided]
We now use the structural input: finite-dimensional modules over a finite-dimensional semisimple Lie algebra over an algebraically closed field of characteristic $0$ are completely reducible. The hypotheses needed for Weyl's complete reducibility theorem are all present: the field $F$ is algebraically closed of characteristic $0$, the Lie algebra $\mathfrak g$ is finite-dimensional and semisimple over $F$, and the adjoint module $\mathfrak g$ is finite-dimensional.
Since $\mathfrak a \subseteq \mathfrak g$ is a $\mathfrak g$-submodule by the previous step, complete reducibility gives a complementary $\mathfrak g$-submodule $\mathfrak b \subseteq \mathfrak g$. Thus every element $z \in \mathfrak g$ has a unique decomposition
\begin{align*}
z = y + w,
\end{align*}
with $y \in \mathfrak a$ and $w \in \mathfrak b$, and the intersection satisfies
\begin{align*}
\mathfrak a \cap \mathfrak b = \{0\}.
\end{align*}
Equivalently,
\begin{align*}
\mathfrak g = \mathfrak a \oplus \mathfrak b
\end{align*}
as $F$-vector spaces.
[/guided]
[/step]
[step:Convert the invariant complement into an ideal]
It remains to verify that $\mathfrak b$ is an ideal of $\mathfrak g$. Since $\mathfrak b$ is a $\mathfrak g$-submodule of the adjoint module, for every $x \in \mathfrak g$ and every $w \in \mathfrak b$ one has
\begin{align*}
[x,w] = \operatorname{ad}_x(w) \in \mathfrak b.
\end{align*}
Therefore $[\mathfrak g,\mathfrak b] \subseteq \mathfrak b$, so $\mathfrak b \trianglelefteq \mathfrak g$. Combining this with the direct-sum decomposition obtained above gives an ideal $\mathfrak b \trianglelefteq \mathfrak g$ such that
\begin{align*}
\mathfrak g = \mathfrak a \oplus \mathfrak b.
\end{align*}
This proves the theorem.
[guided]
The last point is to translate the module-theoretic conclusion back into Lie-algebra language. The complement $\mathfrak b \subseteq \mathfrak g$ obtained from complete reducibility is not merely an $F$-linear subspace; it is a $\mathfrak g$-submodule for the adjoint action. This means that for every $x \in \mathfrak g$ and every $w \in \mathfrak b$, the action of $x$ on $w$ remains in $\mathfrak b$:
\begin{align*}
\operatorname{ad}_x(w) \in \mathfrak b.
\end{align*}
By the definition of the adjoint representation, $\operatorname{ad}_x(w) = [x,w]$. Therefore
\begin{align*}
[x,w] \in \mathfrak b
\end{align*}
for every $x \in \mathfrak g$ and every $w \in \mathfrak b$, which is exactly the condition
\begin{align*}
[\mathfrak g,\mathfrak b] \subseteq \mathfrak b.
\end{align*}
Thus $\mathfrak b \trianglelefteq \mathfrak g$. Since the preceding step also gave the direct-sum decomposition
\begin{align*}
\mathfrak g = \mathfrak a \oplus \mathfrak b
\end{align*}
as $F$-vector spaces, this $\mathfrak b$ is the required ideal complement to $\mathfrak a$.
[/guided]
[/step]