1. Can the retreating unit be subjected to Opportunity fire?
No. Opportunity Fire can only be executed against Moving units, while retreating is not considered movement by the rules.
2. Similarly, if an APC unloads and the infantry unit uses its one-hex move after unloading, can the infantry unit be subjected to Opportunity Fire during this one-hex shift/move?
Yes, because that is a voluntary Movement action.