At first, he might try to be cool about it and spy on them from a distance. He'll be observing their body language and trying to figure out what the relationship is. Then, if he thinks there's something romantic going on, he could get angry and start making snide remarks to Beckett when he finally gets the chance to talk to her.
He might get jealous right away. He could storm off and then later come back to confront Beckett about it.
He might react with jealousy. He could glare at Josh and then give Beckett a hurt look before storming off.
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.
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.
He might be in denial at first. He could keep trying to convince himself that there's no way Beckett would leave him.
In a fanfic where they have a baby, their relationship would shift. They would now be partners not only in crime - solving but also in parenting. Castle would likely become more domesticated, helping with diaper changes and midnight feedings. Beckett would have to learn to let Castle in more on the parenting front, and they would communicate more about family - related matters. This new aspect of their relationship would add a different layer of complexity and closeness to their bond.
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.
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.
A Castle and Beckett baby fanfic could be about their journey into parenthood. It might explore how they adjust to having a baby in their lives. For example, Castle could be super excited and start writing new stories inspired by his new family experience, while Beckett might be a bit more cautious and protective.
She is probably angry and frustrated. She would demand Castle to explain why he thinks so and would be hurt that he doesn't trust her.
She could be defensive of Beckett. Since Alexis probably has a good relationship with Beckett, she may try to convince Castle that he's wrong and that Beckett didn't mean any harm. For example, she might tell Castle about all the positive things Beckett has done for her.