The speed of a motorboat is $a \mathrm{~km} /$ hour, and that of a steamboat is $b \mathrm{~km} / h o r a$. Both vehicles travel the $A B$ route, but the motorboat only starts when the steamboat has already traveled $d$ km. The latter still arrives $n$ hours later at $B$, compared to the former. What is the distance of $A B$?
I. solution. The motorboat covers the distance $A B=x \mathrm{~km}$ in

$$
\frac{x}{a}
$$

hours. From the time the motorboat starts, the ship covers $x-d \mathrm{~km}$ to $B$; traveling at a speed of $b \mathrm{~km} /$ hour, it takes

$$
\frac{x-d}{b}
$$

hours. This is $n$ hours more than the motorboat's travel time, so

$$
\frac{x-d}{b}=\frac{x}{a}+n
$$

From this,

$$
(a-b) x=a d+a b n
$$

thus, if $a \neq b$, then

$$
A B=x=\frac{a(b n+d)}{a-b} \mathrm{~km}
$$

The data $a, b, d, n$ are positive numbers, and the solution only makes sense in the context of the problem if it is positive. Therefore, the problem has a solution only if $a>b$ (which is obvious), and in that case, there is always one solution.

II. solution. The problem clearly has a solution only if $a>b$. In that case, the motorboat gains an advantage of $a-b$ km per hour over the steamship. The motorboat overtakes the ship on the $A B$ route, and even gains such an advantage that the ship can cover in $n$ hours, i.e., $b n \mathrm{~km}$ advantage. To overcome the $d$ km disadvantage and gain the $b n \mathrm{~km}$ advantage, the motorboat needs

$$
\frac{d+b n}{a-b} \text { hours }
$$

time. Thus, in this time, it covers the $\overline{A B}$ route, and the length of the distance covered is

$$
A B=a \frac{b n+d}{a-b} \mathrm{~km}
$$