I think with the group shots for summits the spot for each leader is designated beforehand and it's up to them to get to their spot. For NATO, G7 or G20 photo ops the American President is usually front and center with the leader of the host nation. Obama was never in the back row. Trump looks like he was just trying to get to his spot, not bullying his way to the front to steal someone else's moment.