Case(1)
Let velocity of man relative to earth is V1,
V1=V+u where V is velocity of buggy after both of them jump off simultanieously.
Applying conservation of momentum:
0=2m(V+u) + MV
V= - 2mu/(M+2m) Ans
Case(2)
When first man jumps off th buggy, velocity of buggy is V1
0=m(V1+u) + (M+m)V1 [ applying same logic as in case 1)
V1= - mu/(M+2m)
When second man jumps off, velocity of buggy becomes say V2
(m+M)V1=m(u+V2)+MV2
Solve for V2 and substitute the value of V1 you will get:
V2= - m(2M+3m)u/[(m+M)(2m+M) Ans