On moving across a period, the size of atoms decreases and on moving down a group the size of atoms increases. The effects seem to cancel out. Similar to size, covalence, basic nature, electronegativity also cancel out differences. So these diagonally next elements in 2nd and 3rd periods have similar chemistry.
Lithium and magnisium is a pair. B barium and Si silicon are similar.
Li & Mg : charge density on ions is nearly same
they form only normal oxides
Chlorides of both absorb moister and soluble in alcohol