A generalization of working problem. Question: If X finishes for 4 hours a project and Y for 6 hours a project than how long it takes if they work together in same project?
These questions for two people are pretty simple, just product of hours divided by their sum. But this logic doesn't work also for three people or more? How can we generalize this situations?
A generalization that it works for different hours not for same hours and n - people(workers).
 A: Instead of memorizing formulas here, you should be working for understanding the process: How fast does X work? How fast does Y work? In a given time $t$, how much can they each accomplish? Now assume that their work is additive (which is why I hate questions stated this way, because when two or more people work on the same project, their work is seldom ever additive - yet these problems depend on your assuming that it is, even though they give you no cause to believe it).
In your example X works at a rate of $\frac14\frac{\text{project}}{\text{hour}}$, Y works at a rate of $\frac16\frac{\text{project}}{\text{hour}}$. In $t$ hours, X does $\frac t4$ of the project, and Y does $\frac t6$ of the project (with that unjustified additive assumption), so together they do
$$ \frac t4 + \frac t6 = t\left(\frac14 + \frac16\right) = \frac5{12}t$$
of the project. If $t$ is the time to complete the project together, then $$\frac5{12}t = 1\text{ project}$$ and so $t = \frac {12}5 = 2.4$ hours.
To expand this to more people: Let $T_i$ be the length of time it takes for person $i$ to finish alone.


*

*The rate of work for person $i$ is $\frac {1 \text{ project}}{T_i\text{ hours}} = \frac{1}{T_i} \frac{\text{project}}{\text{hour}}$

*Let $t$ be the time it takes them to finish working together.

*Person $i$ contributes $t\times\frac{1}{T_i}$ of the project (that unjustified hidden assumption again).

*The sum of everyone's contributions is the entire project. If there are $n$ people total:
$$\frac{t}{T_1} + \frac{t}{T_2} + \ldots + \frac{t}{T_n} = 1$$
$$t\left(\frac{1}{T_1} + \frac{1}{T_2} + \ldots + \frac{1}{T_n}\right) = 1$$
$$t = \frac{1}{\frac{1}{T_1} + \frac{1}{T_2} + \ldots + \frac{1}{T_n}}$$

A: idk why schools go on teaching this tortuous method, probably just to teach you to work with reciprocals, but you can easily avoid it, and convert it to "normal" equations, and that is just by a simple extension of the formula you yourself have given  !
Suppose $A$ takes $a$ hrs, $B$ takes $b$ hrs, and $C$ takes $c$ hrs to complete a job.
Imagine that the job is of size $abc$ units of work
Then $A$ works @ $\frac{abc}{a} = bc$ units/hr,
similarly $B$ works @ $ac$ units/hr,
and $C$ works @ $ab$ units/hr
So time needed = $\dfrac{abc}{bc+ac+ab}$ 
