How to solve a simple diode gate question from Sedra and Smith (Exercise 4.4)?
I really liked Daniel's first comment to your question. Right out of the gate he told you how to look at it in the best way one can do in a comment. Looking at your latest comment (to Daniel), I can now see where your brain is at and how you might need some additional information.

Let's start with your latest confusion about diodes, though.

You say that you completely understand the result if you start out thinking that the \$3V\$ diode is turned on. You recognize that the other diodes will be reverse-biased and therefore those other ones will be off. That's a great starting point. Then you seem confused about then thinking over the situation where the \$2V\$ diode is instead turned on. Then you think that the \$3V\$ diode is also turned on and that confuses you because then you have two different voltages hooked up to the same line and you don't know which one would win, or why.

But the answer comes when you take just a little bit of a closer look at the situation there. You've forgotten all about the \$1k\Omega\$ resistor! Now let's factor that into your thinking.

So, start out with the \$2V\$ diode turned on. (Assuming no diode drop for now -- I guess these are ideal diodes.) This should pull the line over the resistor to \$2V\$. You already know this. But the current will be \$2mA\$, right? Now, let's turn on that \$3V\$ diode. What happens? Well, the current rapidly starts to rise as the \$3V\$ diode now starts to flood in current from its \$3V\$ source. This additional current will force a higher voltage drop across the \$1k\Omega\$ resistor as this new added current rushes in. This forces the resistor's voltage drop to increase, thus forcing that side of the resistor upward towards the voltage from the \$3V\$ diode. Quite quickly, you can see, the voltage across the resistor will increase above \$2V\$ and the \$2V\$ diode will simply turn off now, yielding control over to the \$3V\$ diode. Once the voltage drop across the resistor reaches \$3V\$ then that diode will stop increasing its current flow at just the right point. And all the other diodes will now be off.

As you can see, the \$3V\$ diode will, in effect, force all of the lower voltage diodes to be turned off. Even if they were on before.

A similar (but reversed) thinking process answers the other question, too.

Does that help make sense of it?