One possibility is that Castle has booked the hotel for a romantic getaway by himself, and seeing Beckett there completely throws him off. Beckett could be there for a much more serious reason, like following a lead on a dangerous criminal. Castle may start to worry about Beckett's safety and decides to stay close to her. As they interact more within the hotel, they might realize how much they've missed each other's company, and this chance meeting could be the start of something new between them, whether it's a new level of friendship or a re - awakening of their romantic feelings.
Another thing that could occur is that Castle decides to confront Beckett about what he saw. He could be really straightforward and ask her what's going on between her and Vaughn. This could lead to an argument or a really honest conversation about their relationship.
The plot could develop in many ways. For example, if it's a mystery - focused fanfic, Beckett's presence at the hotel could be linked to a big mystery. Castle, being a mystery writer, would be eager to get involved. They might start investigating together, exploring different parts of the hotel. As they do so, they could face various challenges and obstacles, which would bring them closer together. Along the way, they could also discover secrets about each other that they didn't know before.
One possible plot could be that Castle sees Beckett with Josh and it makes him realize his true feelings for her. He might then start to compete for her attention in a humorous and endearing way, like writing a new novel inspired by his jealousy and love for her.
He could react with anger. After all, if he has feelings for Beckett, seeing her with someone else like Vaughn might make him furious. He might lash out at both Beckett and Vaughn without really understanding the situation.
Perhaps the man is a new partner Beckett has been assigned to work with on a case. Castle sees them together and his insecurities get the best of him. He starts imagining all sorts of things, like Beckett replacing him in her life. However, in the end, it turns out that Beckett has no romantic feelings for the other man and Castle realizes he overreacted.
In such a fanfic, they could be there for a business meeting. Maybe they meet by chance in the hotel lobby and end up collaborating on a project. Beckett might be a bit reserved at first, but Josh's friendly nature breaks the ice.
He might react with jealousy. He could glare at Josh and then give Beckett a hurt look before storming off.
He might get jealous right away. He could storm off and then later come back to confront Beckett about it.
Your best bet would be to search on large fanfic platforms. Archive of Our Own (AO3) is a great place to start. Just go to the website, type in 'Castle' in the search bar, and then add keywords like 'Vaughn', 'Beckett', and'seeing a kiss'. Another option is Fanfiction.net. Navigate to the 'Castle' section and use the same kind of keyword search. There may also be some smaller, more specialized fanfic sites related to the show, but AO3 and Fanfiction.net usually have a wide range of content.
In a fanfic like this, there could be a lot of emotional turmoil. Beckett and Castle might start to realize how much they actually rely on each other. When they are pretending to be separated, they could find that they miss the little things about each other. For instance, Castle might miss how Beckett always has a smart comeback during their banter, and Beckett might miss Castle's goofy sense of humor. This could lead to some internal conflict for them as they try to maintain the facade while also dealing with their growing feelings for each other during this 'pretend' separation.