why do beryllium and flourine combine in a 1 : 2 ratio ?

beryllium has electron arrangement of 2.2 n fluorine has electron arangement of 2.7.so they will combine n release their valence electron ...for beryllium,it release two electron and donate 1 to 2 atoms of fluorine ..fluorine has 7 valence electron,so it needs only 1 electron to get the stable octet arrangement.so,the remain 1 electron release by beryllium is donate to another one of fluorine atom..hence,we get two fluorine atom n beryllium combine together.