In the following example, I want to have \hfill (or a similar command) expand the available space, so that the text after it is pushed to the right as much as possible.
\documentclass{article}\usepackage{mathtools}\begin{document}\[ \begin{aligned} A&=B &=C \\&\hfill +D&= E\\& +F &\hfill =G\\ \end{aligned}\]\end{document}However, it seems to be ignored in the previous snippet.
Is there a way to achieve this?