The P51b and D share the same airframe both with merlin engines. The B has the birdcage hood and the D has the bubble. The B has 4 50cals while the D has 6 (can also have 4).
The B we have has the high-alt engine and is faster than the D between 15k-21K and again over about 26K with max speed 30K some 442MPH.
The D is faster from 0-15K and then again from 21-26K. with top speed 437MPH at 26K.
The B has lower climb rate under 10K, but over that its better than the D.
The B is also a little bit lighter, mainly from the reduction in guns, which gives it a lower wing-loading which means slightly better sustained turn performance.
So i guess, if you ignore the gun disparity, the D is for lower alt fightin, the B for higher alt fightin.
The D with the 4 gun package is a nice bird too