Q.
If NA is number density of acceptor atoms added and ND is number density of donor atoms added to a semiconductor, ne and nh are the number density of electrons and holes in it, then
Donor atoms increase number of conduction electron and must be added to available electrons.
Similarly for holes and acceptor atoms.
The equation is formed according to the law of electrical neutrality.