Ideally you'd be friends with both and use that friendship to build bridges between both of those nations and mend any enmity between them. Easier said than done but it shouldn't have to be an either/or situation when it comes to foreign policy regarding 2 important nations who share a border.