A world only with two contries (net exporter)
So we have
$$S^A = I^A + NX^A $$
$$S^B = I^B + NX^B $$
where $S^A$ and $S^B$ are exogenous constants. And since there are only two countries we have
$$NX^A = -NX^B $$
which leads to
$$S^A - I^A = -( S^B - I^B ) $$
Use that last equation to solve for r (after plugging in the I formulas). Then solve the first equation and require that $NX^A$ be positive.