If i am in a threatened square beside oponent #1, i take an action to move out of the square and go attack opponent #2 who is 20 feet away. Both opponent have only 5' reach. Do i provoke an attack of opportunity from opponent #1? I am not withdrawing, just making a move action/standard attack.
To reiterate, you provoke for leaving a threatened square not entering. Assuming an opponent has 5ft reach you will only provoke from leaving an sqaure adjacent to their square.
In the scenario given, you should provoke only once.