Voltage Output of a Current Source in Parallel and in Series with a resistor
\$V_{\text{out}}\$ is equal to the sum of the voltage across \$R_1\$ and the voltage \$V_{CS}\$ across the current source (it is, of course, also equal to the voltage across \$R_2\$). In order for \$V_{\text{out}} = g_mv_{gs}R_1\$, you would have to have \$V_{CS} = 0\$. However, an ideal current source will support any voltage across itself so you cannot assume that \$V_{CS} = 0\$. In this case, for KVL to hold true the voltage across the current source is the difference between the voltage across \$R_1\$ and the voltage across \$R_2\$:

$$V_{\text{out}} = -g_mv_{gs}R_2$$

and

$$V_{\text{out}} = V_{CS} + g_mv_{gs}R_1$$

Setting the equations equal to each other and solving for \$V_{CS}\$:

$$V_{CS} = -g_mv_{gs}R_2 - g_mv_{gs}R_1$$