speed = distance/time, so car A's speed is 2/n, and car B's speed is 3/m. To average these two values, we add them and divide by 2, so the speed of car C is
[ 2/n + 3/m ] / 2 = (2m + 3n)/2mn
Since speed = distance/time, then at this speed, we can find the time T it would take to travel 5 miles using:
(2m + 3n)/2mn = 5/T
T = 5(2mn) / (2m + 3n)
T = 10mn/(2m + 3n)
An alternative approach which will work, though I think it's substantially more time-consuming (though a good approach if you'd find the algebra above difficult) - we can invent extremely simple numbers for m and n, solve the problem using those numbers, and then see which of the five answer choices produces the correct answer for our specific choice of numbers. One danger using this approach is that sometimes two or more answer choices both appear to give the correct answer, and then to decide between them you have to come up with another set of numbers.
But here, if n = 2, then car A's speed is 1 mile per hour, and if m = 3, car B's speed is 1 mile per hour. Then car C's speed is clearly 1 mile per hour, so it will take it 5 hours to travel 5 miles. So when n=2 and m=3, the answer to the question needs to work out to be '5'. If we now plug n=2 and m=3 into each answer choice, we find only answer A gives us a value of '5', so it must be right.