Explain why Na could bond with F and Be could bond with Br?

Show all formulas and names of all possible molecules formed with the elements in the question above?