The answer is 3 second.
Explanation:-
here, the token rate is 5 Mbps means the token are filling into the router buffer with a rate of 5 Mbps.
and the token output rate is 20 Mbps means the token are ejecting from the router at a rate of 20 Mbps.
Now if we collectively calculate both rates then we can conclude that tokens are ejecting at a rate of
(Output rate - Input rate) = (20 - 5)Mbps = 15 Mbps
It means in 1 sec when injection and ejection are happening at the same time then 15 Mb of data are ejecting.
In the question given that the buffer is initially full so to empty it 1 second is required
And the total data is of 30 Mb so it will take 2 sec.
So, the total time is = time required to empty + time required to transmit 30 Mb.
total time is = 1 sec + 2 sec
Hence, Answer is 3 sec