Hope is being targeted by the Phoenix Force, so the Avengers just arbitrarily decide to take her into custody... which is what kicks off hostilities with the X-Men.
Avengers & X-Men have had a loose friendship for decades but are often in conflict. You'd think that offering to help with the situation would've been a smarter way to go.