Contractor Among Contractors
WordIsBond 's job has never been outsourced
If you invoice your mate, you're doing him a favour, classic substitution example, nails IR35. If you invoice the client directly, then he hasn't brought you in, they have, from a legal perspective, all he's done is give you/them a referral. That's not substitution.
As said, sign a one-page contract. You don't have to worry about making it IR35 friendly, it's only a few days, just put down what you've agreed and get him to sign it before he goes. If you can't get the contract because he already left on holiday, work anyway -- you've got a verbal agreement, and the client knows about it, so it's probably enforceable even if he tries to get funny. This might be the one exception to the "never work without a contract" rule. You are wise to try to get something in writing, but for a few days it probably won't matter if you don't. He's not likely to destroy a relationship with you and potentially with the client for the amount of money involved.
It's good for him, and it's great for you. Something else on your CV, another potential client down the road, etc. Keep it simple and don't put up any roadblocks about contracts.