Brooklyn man gets 22 years for killing foster mother