Well, the following is a very simple trick that “kinda solves the problem”:
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not always necessary, but recommended.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{amsmath}
\begin{document}
% \slshape % if uncommented, will the reference to the Magic Theorem be slanted?
Some text before the equation, to show where the right margin lies. Oh, no,
that was not enough: \emph{now} it is enough!
\begin{flalign*}
\textit{formula\_result} &= \textit{short\_term} \\
&= \textit{muuuuch\_loooonger\_term} + \textit{another\_one}
&& \text{by \ldots} && \\
&= x-x
&& && \makebox[0pt][r]{by the Magic Theorem} \\
&= 0
\end{flalign*}
Some text after the equation, to show again the position of the right margin of
the text block.
\end{document}
This is the output I get (on a TeXLive 2016, sorry, but that’s what I’ve got at the moment):

Addition:
An even simpler solution using \hidewidth
, which, however, does not yield exactly the same printout as the previous one:
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not always necessary, but recommended.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{amsmath}
\begin{document}
Some text before the equation, to show where the right margin lies. Oh, no,
that was not enough: \emph{now} it is enough!
\begin{flalign*}
\textit{formula\_result} &= \textit{short\_term} \\
&= \textit{muuuuch\_loooonger\_term} + \textit{another\_one}
& \text{by \ldots} & \\
&= x-x
& \hidewidth\text{by the Magic Theorem} & \\
&= 0
\end{flalign*}
Some text after the equation, to show again the position of the right margin of
the text block.
\end{document}
Indeed, IMHO the output is actually better, with both explanations aligned along the right margin:

Second addition:
If you object to using plain TeX commands like \hidewidth
, you can replace the second example with the following code
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not always necessary, but recommended.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{amsmath}
\begin{document}
% \slshape
Some text before the equation, to show where the right margin lies. Oh, no,
that was not enough: \emph{now} it is enough!
\begin{flalign*}
\textit{formula\_result} &= \textit{short\_term} \\
&= \textit{muuuuch\_loooonger\_term} + \textit{another\_one}
& \text{by \ldots} & \\
&= x-x
& \makebox[0pt][r]{by the Magic Theorem} & \\
&= 0
\end{flalign*}
Some text after the equation, to show again the position of the right margin of
the text block.
\end{document}
with no change in the output.
\condexp[1]{...}
?