Could not understand the display function

i could not understand the display question that how the concept had been applied there and how the code is been written. what is b and bs in the display function