2. Two workers, working simultaneously, complete a certain task in one day. When they work one after the other, each working for as many hours as the fraction of the work they complete in one day, then $k$ parts of the work would be completed. How much time does each worker need to complete the work alone?
Solution. Let the first worker complete the work in $x$ units of time; then the second worker will complete the work in $\frac{x}{x-1}$ units of time. According to the condition of the problem, we have

$$
\frac{1}{x^{2}}+\frac{(x-1)^{2}}{x^{2}}=\frac{1}{k}
$$

from which we get

$$
(k-1) x^{2}-2 k x+2 k=0
$$

The solutions to this equation are $x_{1 / 2}=\frac{1}{k-1}\left(k \pm \sqrt{2 k-k^{2}}\right)$.

Equation (1) must have real solutions, so $2 k-k^{2} \geq 0$, i.e., $k \in[0,2]$, and since $k$ is a natural number, we get that $k=1$ or $k=2$.

For $k=1$, from (1) we get $x=1$, i.e., the first worker would complete the entire work, and the second worker would have nothing to do, which is not possible in joint work. For $k=2$ we have $x=y=2$, i.e., both workers will complete the work in the same amount of time.