Propagation delay Tp = 20ms
Transmission delay for each packet = 1000*8/10^6 = 8ms
Now each packet needs to be transmitted thrice and has to pass through three links each have one way delay as 20ms.
Here we have 5000B/1000B = 5 packets.
So 1st packet will reach host B after 3*8 + 3*20 = 84ms
2nd packet will start getting transmitted 8ms after the 1st packet started its transmission.
So 2nd packet will reach host B after 84+8= 92ms
Similarly 3rd packet will reach host B after 92+8 = 100ms
4th packet will reach host B after 100+8= 108ms
And finally, 5th packet will reach host B after 108+8= 116ms
So total time required is 116ms.