Let speed of train be x

Let speed of care be y

We know that Distance = Speed * Time

ATQ :-

320/x + (600-320)/y = 8 + 40/60 hours = 8 + 2/3 hours..............................................(1)

200/x + (600-200)/y = 8 + 40/60 + 30/60 = 8 + 2/3 + 1/2...........................................(2)

I have just used the formula Time = Distance/Speed to write speed of train and car individually.

Writing (1) and (2) as linear equations by putting 1/x=a and 1/y=b..............................(3)

320a + 280b = 8 +2/3

200a + 400b = 8 + 2/3 + 1/2

Thus, solving the above equations, we get a = 1/80 and b=1/60

Now, x = 80 and y = 60 ................................................................................using (3)

So, speed of train is 80 kmph and speed of car is 60 kmph.

Good if understood, if not then please comment :-)

All the Best ! :-)