Inmate freed with help by Kim Kardashian West gets book deal