WARNING
The formula given for Case$1$ doesn't necessarily give the optimal time, trial and error can throw up better answers (see comments below the answer), but the formula for Case $2$ should be ok, as all reach the end simultaneously.
There are two assumptions I make at start:
(i) the bike is faster than each of the walkers (reasonable !)
(ii) zero time is wasted in switching from bike to walk or vice versa (unreasonable but customary !)
WLOG, I take time to bike entire distance as $1$, and that of the walkers as $a,b,c,\;\; a < b < c$
[ The cases where two or three have the same walking speed are progressively simpler cases ]
First consider the two slowest walkers.
Let (say) the faster one start with the bike, leave it at fraction $f$ of the distance, and walk the rest of the way, whereas the other walker starts by walking, and rides the remaining distance on reaching the bike.
Let $t$ be the time needed for both of them to simultaneously reach the end, then
$f + (1-f)b = (1-f) + f*c = t\;\; \Rightarrow f = \dfrac{b-1}{b+c-2}$
and $\;t = \dfrac{bc-1}{b+c-2}$
Two cases can now arise:
Case $1:\;t > a$
Example:$\; a = 1.5, b = 2, c= 20 \to t= 1.95$
Decision rule: Let $a$ walk the whole distance. Optimal group reach time $= 1.95$
Case $2:\;t \le a$
Example:$\; a = 1.5, b = 1.6, c= 1.7 \to t= 1.323$ (considering only $b$ and $c$)
Decision rule: All three should share the bike for appropriate fractions of the distance and arrive simultaneously.
Appropriate fractions
Let $f_1,f_2,f_3$ be the fractions of full distance the bike is used by $a,b,c$
and the time taken for them to reach simultaneously be $t$
$f_1 + (1-f_1)a = t \to f_1 = \dfrac{a-t}{a-1}$
$f_2 + (1-f_2)b = t \to f_2 = \dfrac{b-t}{b-1}$
$f_3 + (1-f_3)c = t \to f_3 = \dfrac{c-t}{c-1}$
Now $f_1+f_2+f_3 = 1$, which yields:
$t = \dfrac{(2 a b c - a b - a c
- b c + 1)}{(a b + a c + b c - 2 a - 2 b - 2 c + 3 )}$
Using the above decision rule brings down the optimal time from $1.5$ (due to laggard $a$ to $\approx 1.3925$