Answer: K and Br
Step-by-step explanation: Ionic compounds are formed by the transfer of electrons between metals and non metals.
Electronic configuration of potassium:

Potassium atom will loose one electron to gain noble gas configuration and form potassium cation with +1 charge.

Electronic configuration of bromine:

Bromine atom will gain one electron to gain noble gas configuration and form bromide ion with -1 charge.

In potassium bromide
,one electron from potassium metal gets transferred to bromine atom.