As per the problem
A jet flew for 2 hrs before strong head winds reduced its speed by 40 mph.
It took the plane 5 hrs to travel 1,380 miles
Total time=5 hrs, Time of fly before headwinds
,
Time of fly in headwinds

Let the speed before head winds

Then speed in headwinds

As we know that

Hence using this formula and the given data we can write

Hence speed before flying into the headwinds=300mph