Algebra - Word Problems: Derivation of Equations

Two people left simultaneously two points: one left point $A$ for point $B$ and the other left $B$ for $A$. Each of them walked at a constant speed and, having arrived at the point of destination, went back at once. First time they met $12$ km from $B$, and the second time, six hours after the first meeting, $6$ km from $A$ . Find the distance between A and B and the speeds of the two people.


Let person $P_1$ start from point $A$ and person $P_2$ start from point $B$ simultaneously

Let speed of $P_1$ $= u$ kmph

and speed of $P2$ $= v$ kmph

Let distance $AB = x$ km

For first meet at point $M_1$, $12$ km from point $B$:

Let $P_1$ and $P_2$ meet for the first time at point $M_1$

Then, distance $\left(BM_1\right) = 12$ km and distance $\left(M_1 A \right) = x - 12$ km

Time taken by $P_1$ to cover distance $M_1 A$ $= t_1 = \dfrac{M_1 A}{u} = \dfrac{x - 12}{u}$ hr $\;\;\; \cdots \; (1)$

Time taken by $P_2$ to cover distance $BM_1$ $= t_2 = \dfrac{B M_1}{v} = \dfrac{12}{v}$ hr $\;\;\; \cdots \; (2)$

Since $P_1$ and $P_2$ meet at point $M_1$, $t_1 = t_2$

$\therefore \;$ We have from equations $(1)$ and $(2)$

$\dfrac{x - 12}{u} = \dfrac{12}{v}$

i.e. $\;$ $\dfrac{u}{v} = \dfrac{x - 12}{12}$ $\;\;\; \cdots \; (3)$

For second meet at point $M_2$, $6$ km from point $A$:

Let $P_1$ and $P_2$ meet for the second time at point $M_2$

Then, distance $\left(AM_2\right) = 6$ km and distance $\left(M_2 B \right) = x - 6$ km

Time taken by $P_1$ to meet at $M_2$ $= t_3 = \dfrac{AB + M_2 B}{u} = \dfrac{x + x - 6}{u} = \dfrac{2x - 6}{u}$ hr $\;\;\; \cdots \; (4)$

Time taken by $P_2$ to meet at $M_2$ $= t_4 = \dfrac{AB + A M_2}{v} = \dfrac{x + 6}{v}$ hr $\;\;\; \cdots \; (5)$

Since $P_1$ and $P_2$ meet at point $M_2$, $t_3 = t_4$

$\therefore \;$ We have from equations $(4)$ and $(5)$

$\dfrac{2x - 6}{u} = \dfrac{x + 6}{v}$

i.e. $\;$ $\dfrac{u}{v} = \dfrac{2x - 6}{x + 6}$ $\;\;\; \cdots \; (6)$

$\therefore \;$ We have from equations $(3)$ and $(6)$

$\dfrac{x - 12}{12} = \dfrac{2x - 6}{x + 6}$

i.e. $\;$ $x^2 - 12x + 6x - 72 = 24x - 72$

i.e. $\;$ $x^2 - 30x = 0$

i.e. $\;$ $x \left(x - 30 \right) = 0$

i.e. $\;$ $x = 0$ $\;$ or $\;$ $x = 30$

Since distance between points $A$ and $B$ cannot be $0$ km

$\therefore \;$ Distance between points $A$ and $B$ is $= x = 30$ km $\;\;\; \cdots \; (7)$

Also, second meet time $=$ first meet time $+ 6$ hr

$\therefore \;$ We have from equations $(1)$ and $(4)$, for $P_1$

$\dfrac{2x - 6}{u} = \dfrac{x - 12}{u} + 6$

i.e. $\;$ $\dfrac{\left(2 \times 30 \right) - 6}{u} = \dfrac{30 - 12}{u} + 6$ $\;\;\;$ [in view of equation $(7)$]

i.e. $\;$ $\dfrac{54}{u} = \dfrac{18}{u} + 6$

i.e. $\;$ $\dfrac{36}{u} = 6$ $\implies$ $u = 6$ $\;\;\; \cdots \; (8)$

and we have from equations $(2)$ and $(5)$, for $P_2$

$\dfrac{x + 6}{v} = \dfrac{12}{v} + 6$

i.e. $\;$ $\dfrac{30 + 6}{v} = \dfrac{12}{v} + 6$ $\;\;\;$ [in view of equation $(7)$]

i.e. $\;$ $\dfrac{36}{v} - \dfrac{12}{v} = 6$

i.e. $\;$ $\dfrac{24}{v} = 6$ $\implies$ $v = 4$ $\;\;\; \cdots \; (9)$

$\therefore \;$ Speed of $P_1$ $= u = 6$ kmph

and speed of $P_2$ $= v = 4$ kmph