I suppose Sherlock just deduced that that cabbie was willing to take him to where he wanted to go.

Doesn’t he know proper London Taxi etiquette?