Hufflepuff's common room is the easier of the two to place: it sits down by the kitchens, reached through a passage near the barrels, and the entrance is hidden behind a stack of barrels in a particular rhythm.
Ravenclaw's is up in Ravenclaw Tower, one of the highest points of the castle. Instead of a password, you face a bronze door knocker shaped like an eagle, which asks a riddle — answer correctly and the door opens.
Book six gives us the Hufflepuff location directly, while Ravenclaw's tower is described across the series. The contrast is deliberate: one house lives beside the warmth of the kitchens, the other above everyone else.