\[\boxed{\mathbf{378}.}\]
\[Пусть\ \text{x\ }\frac{км}{ч} - скорость\]
\[\ подъема;\]
\[(x + a)\ \frac{км}{ч} - скорость\ \]
\[спуска.\]
\[\frac{\text{AB}}{x}\ ч - уходит\ на\ путь\ AB;\]
\[\frac{\text{BC}}{x + a}\ ч - уходит\ на\ путь\ \text{BC.}\]
\[\frac{\text{AB}}{x} + \frac{\text{BC}}{x + a} = t.\]
\[\frac{\text{BC}}{x}\ ч - уходит\ на\ путь\ CB;\]
\[\frac{\text{AB}}{x + a}\ ч - уходит\ на\ путь\ \text{BA.}\]
\[\frac{\text{AB}}{x + a} + \frac{\text{BC}}{x} = \frac{t}{2}.\]
\[AB + BC = s\]
\[AB = s - BC.\]
\[\frac{s - BC}{x + a} + \frac{\text{BC}}{x} = \frac{t}{2}\]
\[BC = \frac{(x + a)(s - tx)}{a};\]
\[AB = s - \frac{(x + a)(s - tx)}{a} =\]
\[= \frac{x((x + a)t - s)}{a}\]
\[\frac{x\left( (x + a)t - s \right)}{a(x + a)} -\]
\[- \frac{(x + a)(s - tx)}{\text{ax}} - \frac{t}{2} = 0\]
\[\frac{1}{2} \cdot \left( \frac{- 3tx^{2} + ( - 3at + 4s)x + 2as}{x(x + a)} \right) = 0\]
\[3tx^{2} - (4s - 3at)x - 2as = 0\]
\[D = 9a^{2}t^{2} + 16s^{2}\]
\[x = \frac{- 3at + 4s + \sqrt{9a^{2}t^{2} + 16s^{2}}}{6t}.\]
\[Ответ:\ \frac{4s - 3at + \sqrt{9a^{2}t^{2} + 16s^{2}}}{6t}\text{.\ }\]