This problem is from my general maths textbook.
Two guys will travel to a place $20$ miles away from their house. They both will start at the same time, and will walk at a constant velocity of $4$ miles/hour.
However, they own a horse that can carry one person at a time and can run at $10$ miles/hour, regardless of whether someone is riding or not. Find the minimum time required for both of them to reach their destination.
This is what I got till now:
The horse will travel x miles with person 1, drop him off, and turn back to catch person 2 who had been walking that whole time.
We will choose x in such a way that person 1 reaches the destination by the time the horse reaches person 2, and then the horse will carry person 2 the rest of the way, solving it gives $3 \frac{19}{41}$ hours. The answer provided is $3 \frac{1}{11}$ hours. What did I miss?
Update 1:
Apparently we can improve our choice of x. We'll be choosing it in such a way that both persons reach the destination at the same time. This resulted in overall $3 \frac{1}{3}$ hours.
Let $t$ be the minimum time for the trip in hours. The optimal solution is for the horse to take one person $x$ miles, drop him off, go back to pick up the other person, and ride $x$ miles with the second person in such a way that they all reach the destination at the same time. In this way, each person rode for $x$ miles and walked for $20-x$ miles. Since the points where the people switch from walking to riding are each $20-x$ miles from an endpoint, the total number of miles the horse traveled is $$2x+(20-2(20-x))=2x+(2x-20)=4x-20$$
Since time is distance divided by speed, we have the following equations (the first since the horse travelled for a total of $t$ hours and the second since the people rode and walked respectively for a total of $t$ hours): $$\frac{4x-20}{10}=t\\\frac x{10}+\frac{20-x}{4}=t$$
The solution to this system of equations is $x=\frac{140}{11}$ miles and $t=\frac{34}{11}$ hours, as the book suggested.