The velocity for an observer on the ground will be the vectorial sum of the velocity of the airplane and the velocity of the wind:
[A]
For the first case:
Both are going to East, hence you have two vectors pointing the same direction.
Vo = Va +Vw
Vo = 300+30 = 330km/h
For the second case:
The airplane is going to West, so its velocity now is opposite to the velocity of the wind.
Vo = -Va + Vw
Vo = -300 +30 = -270km/h OBS: the minus sign is just saying you're going to West
[B]
For the first case:
v=d/t
t=300/330
t=0.91 h = 54.5min
For the second case:
v=d/t
t=d/v
t=300/270
t=1.11 h = 66.7min
[C]
If there's no wind
V=300 km/h
v=d/t
t=d/v
t=300/300
t = 1h = 60min