Both are TRUE
In general case, SR protocol slides it's window only when an ACK for a packet is received. Depending on the way duplicate packets are handled at the receiver side the answer can be YES.
GBN, this definitely holds true due to the usage of cumulative ACKs.
a) True. Suppose the sender has a window size of 3 and sends packets 1, 2, 3 at t 0 . At t1 (t1 > t 0) the receiver ACKS 1, 2, 3. At t 2 (t 2 > t1) the sender times out and resends 1, 2, 3. At t 3 the receiver receives the duplicates and re-acknowledges 1, 2, 3. At t 4 the sender receives the ACKs that the receiver sent at t1 and advances its window to 4, 5, 6. At t 5 the sender receives the ACKs 1, 2, 3 the receiver sent at t 2 . These ACKs are outside its window.
b) True. By essentially the same scenario as in (a).
Referlink: https://www.ics.uci.edu/~keldefra/teaching/spring2013/uci_cs132/problemsets/CS132_EECS148_ProblemSet3_Solution.pdf
Both a and b are true.