In one bitcoin transaction showing 2 outputs with different addresses, how do I know the wallet address of the recipient? I guess I don't understand what the 2 addresses of the 2 outputs. The 2 addresses are 2 public addresses of the wallet? That doesn't make sense because the 2 addresses have different btc amounts.
If there are 2 outputs, then there are 2 recipients. As simple as that and basically that's all you know.
The fact that in reality there's a high chance that one of the recipients is the same or a different address in the sender's wallet, it's only a (rather small) detail.
If you know/expect that one of the addresses is the change address, then you can look for various other small details that can provide extra info:
* if one "recipient" address starts with the same character as the sender and the other doesn't, there's a good chance that the similar address is change address
* if one address received some pretty "round" amount (in BTC, or USD, or EUR, ..) then the other one may be the change address; also because many wallets don't do fee rounding, the recipient that got coins with more number of characters after the decimal point is probably the change wallet (because of the tx fee)
All these are assumptions based on common use, but most of the times they don't really give a 100% certainty.