Why are you not considering the window size as 3.
0 1 2 safely reached . And we switched to next window of size 3.
Now 3,4,5 are transmitted due to frame size 3 , now since frame 4 is lost , you need to retransmit frame 4 and 5 first then only you can switch to next window and transmit 6 ......
I don't know why you are switching to next window , even if the current window packet 4 has not reached safely?
How can you transmit 6. ???????????
I am having doubt please clarify.