So it's a surprise to Roy that Nyles doesn't know him. The reason Nyles doesn't recognize Roy here, of course, is because Nyles and Sarah escaped the chain together. Roy quickly realizes this because Sarah had called Roy and told him about her plan. So Roy puts two and two together and realizes that Sarah's plan worked.