You need to get the guard out of the way first. See the previous question.
You will also have to get past the sentry room's double doors, so you can meet with Sophia face to face.
Talk to Sophia and look at some of the choices. If you had a rock to hold open the door, you could let her out.