Ethereum token balance calculation

Solution for Ethereum token balance calculation
is Given Below:

I am trying to understand how the ethereum token balance is calculated for the example in the screenshots linked below. The inflows and outflows do not add up to 0 but the balance is being shown as 0. I verified the balance using web3 and it does show 0. Why is the balance 0 in this case?

etherscan token transfers

etherscan “read contract” balanceOf