Dear,
I have worked a lot on to know the working of D, S and B both on the internet and then practically as well on different roads.
what i can tell u from my experience is that..
D is for Normal Drive.....If u r driving on leveled roads drive on D...
S is for Sports and Slopes Both....If u r driving on slopes like uphill or downhill slopes Drive in S...(Practically experienced on Pir Sohawa Slopes with my 1000 cc Belta and overtook every other car even 1300 cc manuals while climbing up but with D were not able to do so and car speed reduces while climbing thus car needs more power and more time to climb up on D so more fuel consumption. As D is economical on flat roads similarly S is economical on slopes)
Secondly S is for Sports as well if u want more pick and want the car to speed up early then go for S. Actually in S the gear changes at higher RPM than normal(D). The car will achieve a certain speed in less time...so if u r not able to overtake someone on a flat road, with S u can do that.
Third is B...that is basically engine Brake...it is for two purposes...one is for very steep upward or downward slopes...for example if the upward slope is too steep and ur car refuses to go more up even on S go for B the car will climb up but definitely in a slow speed. and if the downward slope is too steep...and it seems a bit dangerous to control the car and u r applying brakes again and again r continuously ur foot is on brake pedal, then go for B... the car will automatically controls its speed through engine brakes and the car speed will automatically be controlled on a very steep downward slope otherwise by applying continuous brake the brake may heat up and get jammed so not advisable.
Secondly B is used when so ever ur car is towing another car..it is just to give a better control and save the transmission from unnecessary shifts...
(everything experienced practically except for towing a Vehicle....
...
Hope my post have cleared the functions of D,S and B.