Execution time for pipeline = (K + n - 1 ) $\times$ Tp
Where n = number of instruction , K = number of stages Tp = pipelene time
For D1: Pipeline time = max(3,2,4,2,3) = 4nsec
For D1: Pipeline time = max(2,2,2,2,2,2,2,2) = 2nsec
Execution time for pipeline D1 = (5 + 100 - 1 ) $\times$ 4nseec = 416nsec
Execution time for pipeline D2 = (8 + 100 - 1 ) $\times$ 2nseec = 214nsec
Time saved = D1- D2 = 416- 208 = 202