The average speed would be equal to total distance covered by speeds v1 and v2 divided by 2t i.e. total distance divided by the total time taken

is it a correct ans.
it should be check the answer given in your book
well this is a different method you can calculate the total distance by taking out grom the speed * yime relation then add the distances and divide by total time
sorry the formula was wrong it is a different formula that i mentioned earlier this one is correct