When a prisoner is discharged from prison the Prison Commissioners may provide him with the means of returning to his home either by paying his fare or in any other convenient manner; and where the prison from which he is discharged is situated outside the county, borough or place in which he was arrested, the Prison Commissioners shall pay the cost of his return to the place where he was arrested or to the place where he was convicted, whichever is nearer to the prison.