Gov. Kathleen C. Hochul is backing new legislation that would bar state and local police from working with federal immigration officers, a move she said is a direct response to the deaths of two U.S.