When an object travels in a straight line-
speed= velocity
avg speed=avg velocity
avg velocity = u+v/2
avg velocity = 10+30/2
=20m/s
Then we know that,
v×t=s
t = s / v
Here
v=20m/s
And
S= 4000 m
Therefore
t = s / v
=4000/20= 200 second