The war is also creating strategic opportunities for Washington and new challenges for Beijing in the Middle East.