I believe you are misinterpreting the question.
The question is asking you to design the circuit to meet certain specs, which includes choosing the drain resistor Rd. In your analysis, you are assuming that Rd is 10kohms. The answer states that Rd is 78.5kohms.
Answering your second question first, since I think it's the key. There are clearly two regions of operation here, diode on and diode off. You need to solve for the input voltage where you move from one region to the next, which is when the voltage across R1 is just barely enough to turn the diode on (Vd,on), whilst ignoring the diode.
The input voltage under those conditions is Vin = VB - Vd,on - I*R2 (defining current I as flowing into the source, and thus Vd,on as positive).
However, we know that the current I = Vd,on/R1, so we can say that the input voltage is
Vin = VB - I * (R1+R2) = VB - (Vd,on)*(R1+R2)/R1
The solutions for the two regions of operation can then be easily written down.
Edit: It does appear that the solution has a sign error, or (alternately) that Vd,on is defined to be negative (which may be technically correct, but is just confusing).
The output voltage expression in the blue circle is correct- it's just a voltage divider when the diode is 'off', dividing down (Vin - Vb), as is the expression below that- input voltage plus the diode drop minus Vb, but the slope is 1 since there is no series resistor.
Best Answer
You have an equation for \$v_o\$ of the form \$v_o = kv_{gs}\$ but you need \$v_{o}/v_i\$. Use the hint (which is just KVL) to substitute for \$v_{gs}\$: $$v_o = kv_{gs} = k(v_i - v_o)$$ and solve for \$v_o/v_i\$.
For \$R_o\$ you have forgotten the contribution of the dependent current source. To calculate \$R_o\$ set \$v_i = 0\$, apply a test voltage \$v_t\$ across the output, and calculate the test current \$i_t\$ flowing from that test voltage. Then \$R_o = v_t/i_t\$. Since \$v_i = 0\$, \$v_g = 0\$ and therefore \$v_{gs} = -v_s = -v_o = -v_t\$. The dependent current source therefore supplies a current \$-g_m v_t\$. Now use KCL at the output node to calculate \$v_t\$ in terms of \$i_t\$ and re-arrange to find \$R_o = v_t/i_t\$.