What's actually the purpose for?
Do you want to buy Bitcoin without submitting KYC? just use no KYC P2P or DEX, no need to ask your friend to buy behalf from him.
On the other hand, I don't understand why your friend need to hand his coins to you because he has no way to access his coins anymore, what he can is ask or force you to move the coins.
When it comes to tax, your friend will not have tax obligations since he didn't sell his coins, capital gains tax occur after you exchange coins to other assets e.g. coins, fiat etc.
The reason is that he wants to return the money to me this way. But it's probably better if he returns cash to me, and I buy peer-to-peer for cash in the traditional way. Because I don't want him to incur tax obligations after I sell those sats in the future.