Clear[Wait,rep
,cust,queue,t1,s1,s2];{Wait,rep,cust,queue}={{0},100000,1,1};

While[cust≤rep,t1=Random[ExponentialDistribution[1]];s1=Random[ExponentialDistribution[1]];s2=Random[ExponentialDistribution[2]];If[queue==0,cust=cust+1;queue=1;AppendTo[Wait,0],If[queue==1,If[t1<s1,cust=cust+1;queue=2;AppendTo[Wait,0],queue=0],If[queue==2,If[t1<s2,cust=cust+1;queue=3;AppendTo[Wait,0],queue=1],If[queue==3,If[t1<s2,Wait[[cust]]=Wait[[cust]]+t1;cust=cust+1;queue=4;AppendTo[Wait,0],queue=2;Wait[[cust]]=Wait[[cust]]+s2],If[queue==4,Wait[[cust-1]]=Wait[[cust-1]]+s2;Wait[[cust]]=Wait[[cust]]+s2;queue=3]]]]]]

Clear[p0,p1,p2,p3,p4,L,Wq];{p0,p1,p2,p3,p4,L,Wq}={8/23,8/23,4/23,2/23,1/23,0*p0+1*p1+2*p2+3*p3+4*p4,L/(1*(1-p4))-1};

Compare simulated p with theroretical p

For[i=1;count=0,i≤rep,i++,If[Wait[[i]]==0,count=count+1]];N[{count/rep,(p0+p1)/(1-p4)}]

Compare simulated  Wq with theoretical one

{Mean[Wait],N[Wq]}

Histogram[Wait]