8.6. Ostap Bender put new tires on the car "Gnu Antelope". It is known that the front tires of the car wear out after 25,000 km, while the rear tires wear out after 15,000 km (the tires are the same both in the front and in the rear, but the rear ones wear out more). After how many kilometers should Ostap Bender swap these tires to ensure that the "Gnu Antelope" travels the maximum possible distance? What is this distance?
Solution. Let Ostap Bender swap the tires after x kilometers. Then the rear tires have used up [x/15000] of their resource, and the front tires [x/25000]. After the swap, they can work for another

$$
25000 \cdot\left(1-\frac{x}{15000}\right) \text { and } 15000 \cdot\left(1-\frac{x}{25000}\right)
$$

kilometers, respectively. Thus, the total distance that can be traveled is no more than

$$
x+25000\left(1-\frac{x}{15000}\right)=25000-\frac{2}{3} x
$$

and no more than

$$
x+15000\left(1-\frac{x}{25000}\right)=15000+\frac{2}{5} x
$$

The maximum distance can be traveled if these expressions are equal (otherwise, either the first or the second set of tires will wear out earlier, since when the first expression increases, the second decreases and vice versa). Thus,

$$
25000-\frac{2}{3} x=15000+\frac{2}{5} x
$$

from which $10000=\frac{16}{15} x$, or $x=9375$.

Answer: The tires should be swapped after 9375 km, then a total of 18750 km can be traveled.