The Princess fo Wales visited inmates being supported by a mother and baby unit at a Cheshire prison.