Imagine the network as a pipe, the length of the pipe is the propagation delay, and diameter of pipe as the bandwidth.
At any time it can contain $\frac{10^{6} \text{ bits}}{\text{ sec}} \times \frac{25}{1000}\text{ sec} = 25,000 \text{ bits} \implies 25 \text{ frames}.$
Each of these $25$ frames must have different sequence number, so, we need $\lceil\log_{2} 25\rceil=5\;\text{bits}.$