There are a number of issues:
figure is a floating environment. It is not placed directly but stored and placed where LaTeX thinks it fits best. This can be influenced by the optional argument like
[H] but surrounding alignment environment still don't have any influence on it.
flushright produce paragraphs and therefore a line break. So both contents will always vertical stacked, never side by side.
Note that you don't need a
figure environment to use
\includegraphics, only if you want a caption. Also you can have multiple images and captions (!) in one
figure. Try the following code to place the two images side-by-side and at the left and right corner (if this is what you want):