# Equilibrium interest rate

There are two countries in the whole world: Bolivia and Peru.
The aggregated investements in Bolivia is $$I^B$$ And in Peru they are $$I^P$$ (They are both exogenous).
The savings for Bolivia, where $$B,b > 0$$, are representet by: $$S^B=B+br$$
And for Peru the savings are denoted by $$S^P$$ (Which is Also exogenous).
I want to find the equilibrium interest rate.
I know that you typically Can find the equilibrium interest rate by setting I (the investments) equal to S (the savings), so $$S=I$$.
But I am unsure of how to do it when I have to countries, how would i do this?

Assuming that capital can flow freely, that is, there is one interest rate for the two countries, the answer is that savings = investment in the aggregate, and savings in oune country might go to investment in another. We are given that $$I^B,I^P,S^P$$ are exogenous, so for the two countries, $$I^B+I^P=S^P+B+br.$$ or $$I^B+I^P-S^P-B=br$$ meaning the equilibrium interest rate is $$r=\frac{I^B+I^P-S^P-B}{b}.$$