The talks were a sign that the two countries could reach a diplomatic agreement even though President Donald Trump has hinted at potential military action against the island