To get out of the jail cell, just keep talking to Rosie. After enough conversation, Rex shows up and gets you out.
So the solution is simpler than it looks: stick with the dialogue and the story will move you along automatically.