They build a model in which RIAs unambiguously raise welfare by correcting for externalities. It assumes that trade between neighboring countries increases trust between them and reduces the likelihood of conflict. The optimum intervention in that case is a subsidy on imports from that neighbor. In fact, security threats have moved neighboring countries to form RIAs.
Deep integration implies lower optimum external tariffs if it is exogenous.
But if deep integration is endogenous, it implies higher optimum external tariffs before it occurs and lower ones thereafter.