Gain and output impedance of an amplifier
What do you mean with RDS? Ohmic resistance between D and S in the linear region of the FET? I don`t think so. Speaking about gain you you certainly mean the dynamic resistance rds, correct? This is a resistance determined by the slope of the output characteristics Id=f(Vds).

Knowing that the transistor works as a (non-ideal) controlled current source this source can be seen as an ideal source in parallel with this resistance rds. Hence, the effective resistance at the drain node is RD||rds.

(Please note, that it is always good and necessary to discriminate between an ohmic resistor R and a differential/dynamic resistance r).