If a player is in last place, two other players' tokens share a square, and the last player succesfully plays a detective, that player's token advances five squares as the player in last place is, indeed, in fifth place. (The example in the Avalon Hill rules claims that the last place player would advance four spaces but Klaus says the A.H. folks blew it.)
If both of the players sharing a square succesfully played a detective they would both advance the same number of squares as they are considered to be tied for a position.