We know that,
Sender window size + Receiver window size <= Available Sequence No.
i.e. Ws + Wr <= ASN .....(1)
In Selective Repeat/Reject Protocol, Ws = Wr
Say, Ws = Wr = N.....(2)
Also as in question it is given that n-bits have been used for frame sequence no.
Therefore, Available Sequence No. (ASN) = 2^n
Now from equation (1) and (2),
N + N <= 2^n
=>N <= 2^n-1
Therefore, The maximum window size for data transmission using the selective reject protocol
with n-bit frame sequence numbers is 2^n-1