The rivals see political benefit to the attacks, which could also define New York for the remainder of President Donald Trump’s term in office.