A man accused of killing a US politician and her husband went to the homes of other lawmakers that night, intending to kill them, officials said.