I'm thinking it was more of a coincidence thingy. Where uke went with his bf to buy seme's new novel since bf needs some guidance since he's also studying to be a writer. BF talked about something on the book, and uke responded. Seme, who was also inside the store to check on the sales of his book, overheards uke's answer. And it piqued his interest. That's where he knew uke could see and also the relationship between him and the uke.
Right? Cliche or not, I wouldn't be too surprised either if there was some such connection between them in the past. They may have met at some point when Ah-in was still too young to remember, for instance. It also could have something to do with the orphanage?
Either way, Seo somehow seems far too familiar (and, this may just be me but, at times - dare I say - strangely fond?) with Ah-in for only having met him this recently, or merely knowing about Ah-in's private life due to some simple background check.

They are childhood friends and mc doesn't remember. Mark my words.