"the commissioner of correctional services must where it appears that the term of imprisonment of the transferred prisoner will expire while that prisoner is still in the custody of the court in writing inform the registrar of the date on which that term of imprisonment will expire"