How do engines cope with various intake airflow speeds? On a recent trip out of Washington Dulles to San Francisco, our B777 met with 200+ mph headwinds (as per the passenger entertainment system) at 35,000 ft for the first half of the route, before enjoying 50 mph tailwinds at 38,000 ft over Utah, Nevada and finally California. 

The ground speed was displayed at 400 mph for the first half of the trip, then closer to 550 mph. Does that mean that air was rammed into the engines first at 400+200 = 600 mph, then in the second half of the trip at only 550 - 50 = 500 mph? 

How do the engines cope with various intake airflow speeds?
The airplane isn't aware of the winds. It just moves through the air mass at a certain speed, and if the air mass is moving it adds or subtracts from the aircraft's speed over the earth.

Drive your boat along a river with a 10 mph current upstream, then downstream, both at 25 mph on the boat's speedo.  The whole time your boat's showing 25 and the hydrodynamic forces acting on the hull are 25 mph forces. What's your speed relative to the shoreline going upstream compared to going downstream?  15 going upstream and 35 going downstream right?  

Exact same thing with airplanes.  Navigating ships allowing for ocean currents is exactly the same as navigating airplanes in "air currents", they have "tailwind" currents and "headwind" currents and cross currents where you have to aim for point X to actually proceed to point Y, except things are happening in slow motion in the ship.