While learning about Sequence and Acknowledgment numbers one thing bugged me. I wasn't able to rule out for myself if the following scenario in which Host A sends data to Host B by using some established TCP-connection is possible: Host A sends data with sequence number X and acknowledgement number Y to Host B. Host B, in return, sends back data with sequence number Y and acknowledgement number X+1. Now suppose that the data sent by Host B is slow. In the meantime, data from an earlier connection between the same sockets of A and B which is still present in the network and accidentally also has sequence number X arrives at Host A. Would A accept the wrong data packet in this case? How would it be able to detect that its not the right data packet? Or does my scenario not make sense at all?
EDIT: Added the italicised part.