Hmmm...
"Your mount acts on your initiative count as you direct it. You move at its speed, but the mount uses its action to move."
"If your mount charges, you also take the AC penalty associated with a charge. If you make an attack at the end of the charge, you receive the bonus gained from the charge."
"You can use ranged weapons while your mount is taking a double move, but at a -4 penalty on the attack roll. You can use ranged weapons while your mount is running (quadruple speed), at a -8 penalty. In either case, you make the attack roll when your mount has completed half its movement. You can make a full attack with a ranged weapon while your mount is moving. Likewise, you can take move actions normally"
This is interesting. It appears that you take the penalties/bonuses associated with the mounts movement. It also does appear the the attack roll comes at the halfway mark, so definately no AoO from shooting the bow, unless you are being threatened at that point.
However, do you get to get the best of both worlds here and avoid the movement-generated AoO AND get to attack?
That depends.
1. No AoO and an attack: The horse movement does not provoke (edit for Hyp: or, if you like, the "square" is unthreatened because the mount is withdrawing) and therefore you are okay. The attack does not provoke because the attack is not rolled until halfway through the movement. This one "feels" like a loophole because of poorly written mounted combat rules.
2. No AoO and no attack: Since you have to abide by pros and cons of the horse's movement (witness the -2 AC and +2 attack for charge), you get no attack if the horse withdraws, as you, too, are withdrawing. This one is a little weak as you normally get move actions when the horse is moving, but, well, it's supportable, just weak.
3. AoO and attack: The horse indeed provokes no AoO but the rider is not withdrawing and therefore provokes no AoO as he is leaving a threatenend square (for him).
There you have it. Three possibilities, all supported by the rules. Number one
may the most technically correct for rules laywers, while number 3 feels most like the intent of the rules. It really seems wrong to be able to withdraw and still get full actions, but, then, the mounted combat rules are pretty weak.
Once again, more than one right answer.

This is why this game has DMs.