so, the first 200 miles were done at 50mph, how long did it take? well, 200/50, or 4hours
the last 100 miles were done at 40mph, how long did that take? well, 100/40, or 2 hours and a half.
so.. Ying covered 300 miles in 4+2.5 hours or 300/6.5 is his average speed.