how to calculate the Resistor for a mosfet so that the Vout 10 V is?
Here’s one way to go about solving for the last unknown resistor RD. Because you’re using a MOSFET to create a dc voltage of 10V on drain pin, I’m going make the assumption that the MOSFET will be operating in saturation mode and thus has a drain to source voltage VDS&gt;1V. Now, for it to operate in saturation mode, the gate to source voltage  VGS must be greater than the gate threshold voltage VGSth. From your datasheet, this is at minimum 0.8V and Max 3V. Let’s go with 0.8V here as first try. We want  VGS&gt;0.8V but also not too large because then we might enter into ohmic region which isn’t what we want. Well let’s see if datasheet can provide more info. If we take a look at the transfer characteristic curve, if we have VGS=2V, we have transistor on, and some current flow. See figure below with marked red lines. This is a start. Now let’s try to find RD. If VGS=2V and VG=6.8V, then VS=4.8V. Then IS= ID =4.8V/3kohm=1.6mA. Now if VA= VD=10V then VRD=15V-0.7V-10V=4.3V. Finally, RD=4.3V/1.6mA=2687 ohm. We can approximate this as 2.7 kohm. If you simulate this circuit with values found, (I have already), you’ll find that VA=10.22V. No bad for first try. If you try again with an adjustment to VGS, you’ll eventually find that RD=2.8kohm will give much better result.