Let the speed of the airplane as 'x km/hr'

Let the speed of the headwind as 'y km/hr'

Then the speed of the tailwind would be '2y km/hr'

Then you can get two simultaneous equations since 'distance = speed x time'

5(x-y)=3900

5(x+2y)=4500

If you solve the equation, it'll be clear that

the speed of the airplane is 3600 km/hr

the speed of the headwind is 60 km/hr

and the speed of the tailwind is 120 km/hr.

So the answer for the problem (a) would be 60km/hr and 120km/hr

And the answer for the problem (b) would be 3600km/hr