In the scene where Alexis is using bobby pins to unlock the door, she says she learned how to do it from Castle, when he was researching for a book. Molly C. Quinn, who plays Alexis, actually learned how to do this. While doing ballet, she and her friends taught themselves to pick locks with their bobby pins.
While investigating a child abduction in "Little Girl Lost (2009)", Castle tells Beckett that he can't imagine such a thing happening to Alexis. In this episode and the following episode, he actually has to live through that parental nightmare.
The characters with the last name El-Masri are Egyptian. "Masri" literally means "Egyptian" in Arabic.
While theorizing about the motive for Hasim's murder, Castle mentions Jack Bauer. Stana Katic appeared in season five of 24 (2001), and her character interacted with Jack in two of the three episodes in which she appeared.
Note that when Hasim is firing at the van the barrel of his gunn barely bobs up (recoils) with each shot. The SIG Sauer P220 has been a favorite with military and elite forces since about 1980, and comes in large calibers that have a lot of kick. It is the mark of a real pro to be able to fight that recoil. Of course a really real trained shooter , as opposed to an actor using blank ammo, wouldn't blink with every shot.