Generally, there is no information in a bitcoin transaction which indicates the amount being transacted between two parties. An outside observer can view the value of inputs and outputs, but the ownership of each output will be unknown to them. More specifically, the change output is often indistinguishable from the other outputs, so an outside observer may not know which output is the change, and which is the actual amount transacted. This is important, because it helps preserve privacy!
Consider this simple example: User A sends a bitcoin transaction to User B, which looks like this on the blockchain (ignoring fees for simplicity):
Inputs:
Outputs:
Address 2: 2 BTC
Address 3: 3 BTC
As an outside observer, we cannot tell whether User B was sent 2 BTC, or 3 BTC. By design, there is no data to tell us this.
However, in the case of both transactions you linked, the input address has been re-used as the change address, which is not best practices, as it significantly degrades privacy. This allows us to know how much BTC was transacted, because the transaction now looks like this:
Inputs:
Outputs:
Address 2: 2 BTC
Address 1: 3 BTC
And so we can see that User A sent 3 BTC back to themselves, and thus 2 BTC were sent to User B.
NOTE: some block explorers will make a guess at "how many bitcoins were transacted" (sent from one user to another) in a given transaction, according to some logic written by the developers that built that explorer. But this is just a guess, there is fundamentally no way to be certain about this information.
When best practises are followed, it becomes impossible to tell how much BTC was 'transacted': this is by design, and it is important for privacy and fungibility.