pipeline-X:
no. of stages =5 [IF ID OF EX WB]
speedup$(S_X)=\frac{no. \;of \;stages}{(1+no.\;of \;stalls\; per \;instruction)} $
20% memory instruction which are not overlapped so these will create extra stalls,so no. of stalls per instruction=.20*4=.8
$S_X=\frac{5}{(1+.8)}=2.77 $
pipeline-Y:
no.of stage are increased as ID have three sub stages and EX have two sub stages ,so total no. of stages= 8
20% memory instruction which are not overlapped so these will create extra stalls,so total no. of stalls per instruction=.2*8=1.6
$S_Y=\frac{8}{(1+1.6)}=3.076 $
ratio of ($S_X \;and \;S_Y)=\frac{2.777}{3.076}=.9002$