13.329. Two workers were hired for the same period to perform seasonal work with different pay rates per day for each. The first worked $a$ days less than the term and received $r$ rubles, while the second worked $a$ days more than the term and received $s$ rubles. If the first had worked as many days as the second, and the second as many days as the first, they would have received the same amount. Determine the established term of work.
Solution.

Let $x$ be the duration of work. Then the first earned $\frac{r}{x-a}$ rubles per day, and the second $-\frac{s}{x+a}$. Suppose $s>r$.

According to the condition, we have $\frac{r}{x-a}(x+a)=\frac{s}{x+a}(x-a)$, from which $x=\frac{a(\sqrt{r}+\sqrt{s})}{\sqrt{s}-\sqrt{r}}$.

Answer: $\frac{a(\sqrt{r}+\sqrt{s})}{\sqrt{s}-\sqrt{r}}$ days, where $s>r$.