Is this an incoming or outgoing transaction
It depends on your perspective and which addresses you control.

If you are Y or Z, it's an outgoing transaction.

If you are A, then it's incoming,

If you are X, it could be both. If X also controls Y or Z, then it's outgoing as he is sending money to A and the output that sends to X is just a change output. If X does not also control Y or Z, it would be both as Y and Z are simultaneously paying him and A while X is simultaneously paying A and receiving money from Y and Z.