When Brandon refers to what happened to those kids in that Duke case, he's talking about the Duke lacrosse case. It was a widely reported 2006 criminal case in Durham, North Carolina, United States in which three members of the Duke University men's lacrosse team were falsely accused of rape.
In one scene, when Castle sees an incoming phone call is from Beckett, he comments "I hear dead people". This is a reference to Haley Joel Osment's famous line "I see dead people" from The Sixth Sense (1999).
Originally this episode was to air after Hell Hath No Fury. You can tell because at one point in this episode Castle is seen drinking fancy coffee out of a nice white mug with a saucer but he hasn't bought the espresso machine yet. The espresso machine does not appear until He'll Hath No Fury.
One the Season 1 DVD, Hedge Fund Homeboys and Hell Hath No Fury are switched.
The abbreviation "GSW", used at the crime to describe the victim, stands for "gunshot wound".