.
Let d be the distance under the question.
"A" family spent   hours for their trip.
"B" family spent
  hours for their trip.
"B" family spent   hours for their trip.
Difference in time was 2 hours, according to the condition.
Hence, from the condition, you have this "time" equation
  hours for their trip.
Difference in time was 2 hours, according to the condition.
Hence, from the condition, you have this "time" equation
     -
 -  = 2   hours.
To solve it, multiply both sides by 200. You will get
    5d - 4d = 2*200
     d      = 400.
It is your ANSWER :  the distance is  400 miles.
 = 2   hours.
To solve it, multiply both sides by 200. You will get
    5d - 4d = 2*200
     d      = 400.
It is your ANSWER :  the distance is  400 miles.
Solved.