Half the circuit is a simple source degenerated CS amplifier so I don't get how the term \$R_D/r_o\$ came into the gain equation.
3 Answers
You can find the solution in the following figure. In your case, the RL (in the figure below) is infinity, and the RS (in the figure below) is 2Rss. You can replace these terms, and the results will be the same. This link may help you also for other problems (Solution in page 12).
http://aries.ucsd.edu/NAJMABADI/CLASS/ECE65/12-W/NOTES/Amp-2.pdf
-
\$\begingroup\$ Thank you! Actually I was using the same resources but just for the questions practice and got puzzled. \$\endgroup\$ Commented Apr 30, 2017 at 20:20
This is better suited for a comment, but I am as yet unable to do that so in lieu of other answers thus far I will give my 2c.
You need to look at the small signal model for your transistors, they use ro to symbolise the small signal output impedance. When you draw out the model with Rd and ro the equation will make sense. I apologise for not having the resources to do that for you right now but I'm sure other more comprehensive answers won't be too far away.
i am not getting how the term RD/roRD/ro came into the gain equation.
fairly simple: understand what Rd is and what ro is, and note that Id = ~Is. That's all you need to get to the gain.