The two-day G7 gathering focused on Russia's war against Ukraine and the situation in the Middle East.