I think this is the most clear solution that I found on geeksforgeeks…
Transmission delay for 1 frame = 1000/(10^6) = 1 ms
Propagation time = 25 ms
The sender can atmost transfer 25 frames before the first frame reaches the destination.
The number of bits needed for representing 25 different frames = 5