David walks 31 kms partly at a speed of 5 kms per hour and partly at 4 km per…

2026

David walks 31 kms partly at a speed of 5 kms per hour and partly at 4 km per hour. If he had walked at a speed of 4 km per hour when he had walked at 5 and 5 km per hour when he had walked at 4, he would have walked 32 kms. The time (in hours) spent by David in walking was?

  1. A.

    9

  2. B.

    10

  3. C.

    6

  4. D.

    7

Attempted by 2 students.

Show answer & explanation

Correct answer: D

Concept: When a total distance is split between two speeds for unknown durations, and a second scenario reports the total distance if those same durations had used the swapped speeds, write distance = speed x time for both scenarios and add the two equations. Adding does not isolate either unknown individually, but it makes both coefficients equal, so dividing by that common coefficient gives the SUM of the two durations directly - which is exactly the total time spent walking.

Application:

  1. Let a = hours walked at 5 km/h and b = hours walked at 4 km/h in the actual trip.

  2. The actual distances give: 5a + 4b = 31.

  3. Swapping the speeds for the same two durations gives: 4a + 5b = 32.

  4. Adding the two equations: (5a + 4b) + (4a + 5b) = 31 + 32, i.e. 9a + 9b = 63.

  5. Dividing by 9: a + b = 7.

  6. Since a + b is precisely the total time David walked, the total time is 7 hours.

Cross-check: subtract the first equation from the second: (4a + 5b) - (5a + 4b) = 32 - 31, giving b - a = 1, so b = a + 1. Substituting into a + b = 7 gives 2a + 1 = 7, so a = 3 and b = 4. These satisfy both original equations (5x3 + 4x4 = 31 and 4x3 + 5x4 = 32), confirming the total time of 7 hours.

Explore the full course: Tcs Live Preparation