Furthermore, remember that in CoinJoin all outputs have the same size. So in this case one output is 1.5 BTC to 1Friend, so the other two outputs (going to new addresses of Person A himself) each have 1.5 BTC too. So the sum of all inputs must be at least 4.5 BTC. So Person A must have at lest 4.5 BTC in his wallet although he just wants to transfer 1.5 BTC to 1Friend.
Good point. However outputs don't have to be the same value but could be among a set of values. And with the advent of HD wallets, I could ask my friend for an extended pubkey so I could generate as many addresses of them as I wanted, and I would set up the outputs of the CJ accordingly. For example if the outputs must be powers of two between 2^16 and 2^32 satoshis, I could roughly fit 1.5 BTC into that. (2^27 + 2^23 + 2^22 + 2^21 + 2^20) / 1e8 = 1.49946368.