Assumption: when borrowing oil, you can only borrow the whole barrel, otherwise it is meaningless. These two cars are car A and car B respectively.
To make a car run farthest, it is necessary to fill up the car at the farthest place from the starting point. The other car is used to transport and borrow oil.
Then, in order for car B to transport oil, it has to run far and return to the starting point, so at least a barrel of oil should be lent to car A, and then car B can run to (20- 1)÷2 ×50 = 475 km at most.
At this time, car A has 10.5 barrels of oil, and when car B arrives at car A through 10 transportation, car A has 19.5 barrels of oil, and car B has 10.5 barrels of oil.
At this point, the two cars will travel 25 kilometers forward together, 500 kilometers away from the starting point. Car A 19 barrels of oil and car B 10 barrels of oil.
Because back to the starting point, car A can only drive 9.5 barrels of oil forward, 475 kilometers away from the starting point, 975 kilometers away.
On the return trip, both cars can return to the starting point because there is 10 barrel of oil 500 kilometers away from the starting point.
So the answer to the first question is 975 kilometers.
What about the picture of the second question?