It seems pretty simple to me.
If all you do is move, you don't provoke an AOO when you leave the square you started in (in the Player's Handbook terminology, the square you start in is "not considered to be threatened").
So he has backed away from Orc X doing nothing but moving, and X does not have a reach weapon, so no AOO.
(Of course, if you enter and leave another threatened square or if you attack later in the same turn, you are fair game for an AOO, but this has not happened in the above example.)
In the example above, Orc Y does not have a reach weapon. If he closes with Orc Y, has entered a square Orc Y threatens, but he has not *left* it, so no AOO.
I admit, somehow it doesn't make sense in a real-world way, but according to the rules, it's no AOO at all in that case.
Of course, if you have a justification, I'm more than interested in hearing it. Even the rules as written are not always the best.