[guided]We want to prove that $x$ and $y$ are orthogonal under $\kappa$. The only information we have about $x$ and $y$ is how elements of $\mathfrak{h}$ bracket with them, so we insert an arbitrary $h \in \mathfrak{h}$ and use invariance of the Killing form.
Because $x \in \mathfrak{g}_{\alpha}$ and $y \in \mathfrak{g}_{\beta}$, the maps
\begin{align*}
\operatorname{ad}_h|_{\mathfrak{g}_{\alpha}}: \mathfrak{g}_{\alpha} &\to \mathfrak{g}_{\alpha}, &
u &\mapsto [h,u],
\end{align*}
and
\begin{align*}
\operatorname{ad}_h|_{\mathfrak{g}_{\beta}}: \mathfrak{g}_{\beta} &\to \mathfrak{g}_{\beta}, &
v &\mapsto [h,v],
\end{align*}
act by scalar multiplication with eigenvalues $\alpha(h)$ and $\beta(h)$ respectively. Thus
\begin{align*}
[h,x] &= \alpha(h)x, &
[h,y] &= \beta(h)y.
\end{align*}
The Killing form is invariant: for all $a,b,c \in \mathfrak{g}$,
\begin{align*}
\kappa([a,b],c)=\kappa(a,[b,c]).
\end{align*}
Applying this once with $(a,b,c)=(h,x,y)$ gives
\begin{align*}
\kappa([h,x],y)=\kappa(h,[x,y]).
\end{align*}
Applying it again with $(a,b,c)=(x,h,y)$ gives
\begin{align*}
\kappa([x,h],y)=\kappa(x,[h,y]).
\end{align*}
Since the Lie bracket is skew-symmetric, $[x,h]=-[h,x]$. Hence
\begin{align*}
-\kappa([h,x],y)=\kappa(x,[h,y]),
\end{align*}
or equivalently
\begin{align*}
\kappa([h,x],y)=-\kappa(x,[h,y]).
\end{align*}
Now substitute the two eigenvalue identities:
\begin{align*}
\alpha(h)\kappa(x,y)
&=
\kappa(\alpha(h)x,y) \\
&=
\kappa([h,x],y) \\
&=
-\kappa(x,[h,y]) \\
&=
-\kappa(x,\beta(h)y) \\
&=
-\beta(h)\kappa(x,y).
\end{align*}
Moving the right-hand term to the left gives
\begin{align*}
(\alpha(h)+\beta(h))\kappa(x,y)=0.
\end{align*}
This identity holds for every $h \in \mathfrak{h}$.[/guided]