As it turned out, finding the entrance to the underground cavern was easy. Why? For the same reason why there were dinosaurs roaming the streets. The south gate of the castle was wide open, and the floor inside it had been caved in, and the opening leading down into the underground cavern was right under that spot.
They had broken the floor and stacked the broken chunks like steps, so it was pretty easy for the dinosaurs to climb out. The south gate had been taken down, and a bit of the wall around it had been broken off too, probably to make space for the bigger dinosaurs to get through. As for the cavern entrance, it was pretty huge, more than enough for bigger dinosaurs like the T-Rexes to squeeze through.