Since both metals are in the same group in the periodic table and both non-metals are also in the same group in the periodic table, they have the same charge (metals = 1+; non-metals = 1-). So this makes the reaction easier for us:
NaCl + LiBr = LiCl + NaBr