Two men who took part in a stabbing that seriously wounded a fellow inmate at downtown San Diego's federal jail were sentenced Monday to prison terms.