blockchain – Is that this an incoming or outgoing transaction

I just lately checked out this bitcoin transaction:
transaction: 3b0e8fae9640e1d043cfef14815c6885e58d71e7ee31cfa53f9c9d5acb138a4d
For many who don’t need to take a look at the transaction, I’ll give a simplified instance of it:
There are 3 inputs:
X pays 0.5BTC
Y pays 2BTC
Z pays 3 BTC
There are 2 outputs:
A which will get 2.5BTC
X which will get 3 BTC
As you’ll be able to see, the “steadiness” from Y and Z went to X, however X additionally paid out.
Would this be classed as a incoming or outgoing transaction?
The pockets steadiness would in all probability not change as they “might” personal the entire addresses.
I want to assume that they don’t.
Ought to I class them as separate transactions?