Dear friend,
'A' represents sodium (Na) as it's mass is 23u (proton+neutron). It is metal. The symbol of ion is 'Na+' as it will give one electron. Atomic number is 11.
'B' represents chlorine (Cl) as it's mass is 35u ( proton+neutron). It is a non- metal. The symbol of ion is 'Cl-' as it will take one electron. Atomic number is 17.
Sodium will give one electron to chlorine to form sodium and chlorine ion and they will combine to form common salt.
Hope this answer is helpful :)
Regards...