"P" stands for Pursuit, a designation used for fighter types between 1925 & 1947, though this changed in 1947 when the "F" for Fighter designation entered use.
"51" means the the aircraft was the 51st pursuit type to be built.
"D" The fourth main variant of the Mustang which included the 1,490hp Packard V-1650 Merlin engine, six gun main armament, and the teardrop canopy.
"20" This is the Block Number. These numbers ran in fives as minor equipment changes were implemented.
"NA" means that the aircraft was built at Inglewood, California, the other designation "NT" denotes an aircraft built in Dallas, Texas