Task 5. (Option 1).

Away from a straight section of the railway, 20 km from it, lies village V. Where should a halfway station C be set up so that the total travel time from A to V by railway AC and by road CB is minimized. The speed of movement by railway is 0.8, and by road is 0.2 km per minute.
Solution: Let the distance $AD$ (from $A$ to the base of the perpendicular $BD$ to $AD$) be denoted by $a$, and $CD$ by $x$. Then $AC = AD - CD = a - x$, and $CB = \sqrt{CD^2 + BD^2} = \sqrt{x^2 + 20^2}$. The time it takes for the train to travel the path $AC$ is $\frac{AC}{0.8} = \frac{a - x}{0.8}$.

The time it takes to travel the path $CB$ on the highway is $\frac{CB}{0.2} = \frac{\sqrt{x^2 + 20^2}}{0.2}$.

The total duration of the trip from $A$ to $B$ is $\frac{a - x}{0.8} + \frac{\sqrt{x^2 + 20^2}}{0.2}$. This sum, which we denote by $m$, should be minimized.

$$
\frac{a - x}{0.8} + \frac{\sqrt{x^2 + 20^2}}{0.2} = m \text{, which can be represented as } -\frac{x}{0.8} + \frac{\sqrt{x^2 + 20^2}}{0.2} = m - \frac{a}{0.8}
$$

Multiplying by 0.8, we get: $-x + 4 \sqrt{x^2 + 20^2} = 0.8 m - a$. Let $0.8 m - a$ be denoted by $k$. By eliminating the radical from the equation, we obtain the quadratic equation $15 x^2 - 2 k x + 6400 - k^2 = 0$, from which $x = \frac{k \pm \sqrt{16 k^2 - 96000}}{15}$.

Since $k = 0.8 m - a$, the smallest value of $m$ corresponds to the smallest value of $k$ and vice versa. (It should be noted that $k > 0$, because $0.8 m = a - x + 4 \sqrt{x^2 + 20^2} > a - x + x = a$. For $x$ to be real, $16 k^2$ must be at least 96000. Therefore, the smallest value for $16 k^2$ is 96000. Hence, $m$ is minimized when $16 k^2 = 96000$. From this, $k = \sqrt{6000}$, and thus $x = \frac{k \pm 0}{15} = \frac{\sqrt{6000}}{15} \approx 5.16$. The halfway station should be installed approximately 5 km from point $D$, regardless of the length $a = AD$. The proposed solution is valid only for cases where $x < a$, as when forming the equation, we assumed that $a - x$ takes positive values.

In the case where $a = x$, the highway should be built directly to the station, and the same should be done if the distance $a < 5.16$ km.