Three Travellers and a Cart

Classic Puzzle
There are $3$ travellers, $A$, $B$ and $C$.

All of them want to get from $P$ to $Q$, which are $D$ units of distance apart.

$A$ and $B$ travel on foot at $V_A$ and $V_B$ units of distance per unit of time respectively.

$C$ cannot walk, but has a cart, which can carry either $1$ or $2$ travellers at $V_C$ units of distance per unit of time.

They all want to leave $P$ at the same time, and also to arrive at $Q$ at the same time.

They proceed as follows:
 * $B$ sets out on foot, at the same time that $A$ and $C$ set out in the cart.


 * After a certain distance, $C$ drops $A$ off, and returns to pick up $B$, while $A$ continues on foot in the direction of $Q$.


 * $C$ picks up $B$, who travels with $C$ in the cart to arrive at $Q$ at the same time that $A$ also arrives at $Q$.

The question is:
 * How long does it take to arrive at $Q$?

Proof
Let $t$ units of time be the time after they start that they all arrive at $Q$.

Let $C$ drop off $A$ a distance $d_1$ units of distance from $P$.

Let $C$ pick up $B$ a distance $d_2$ units of distance from $P$.

Let $t_1$ units of time be the time it takes $C$ and $A$ to reach $d_1$.

Let $t_2$ units of time be the time $C$ reaches $d_2$ to pick up $B$.

From Body under Constant Acceleration: Distance after Time we have:
 * $s = u t$

for general distance $s$, speed $u$ and time $t$.

Hence we have:

Then we have: