Quiz 2.22

dist=HypoexponentialDistribution[{(Subscript[μ, 1]),(Subscript[μ, 2])}];
Ftilde[s_]=MomentGeneratingFunction[dist,-s]
mtilde[s_]=((Ftilde[s])/(1-Ftilde[s]))
FullSimplify[InverseLaplaceTransform[((mtilde[s])/s),s,t]]

dist=HyperexponentialDistribution[{p,1-p},{(Subscript[μ, 1]),(Subscript[μ, 2])}];
Ftilde[s_]=MomentGeneratingFunction[dist,-s]
mtilde[s_]=((Ftilde[s])/(1-Ftilde[s]))
FullSimplify[InverseLaplaceTransform[((mtilde[s])/s),s,t]]