Donor concentrations between the Gate and Drain
First let's link Nd (donor concentration) and Na (acceptor concentration) to N-type and P-type:

A donor adds an electron so we get N-silicon

An acceptor adopts an electron so we get P-silicon.

So:

Nd => N-type (your X)

Na => P-type (your Y)

If Na = Nd then all you end up with intrinsic (Ni) silicon as the two compensate for eachother.

Then just remember this image:



For an NMOS an N-channel is formed in a P-substrate

For a PMOS a P-channel is formed in an N-substrate (called N-well here but it is still N-type).