بسم الله الرحمن الرحيم
The money which you gave to your friend for doing business on muzaribah and he consumed all those money and now he does not have those money in his hand then in this case you cannot make intention of zakah for the same money and your zakah shall not be paid because in such case it is necessary that the same money is available with the poor person then the intention of zakah shall be valid. However, if you pay your zakah to him and get it back from him in return of your due amount then it is lawful. It is mentioned in Shami (3/308 published Maktaba Zakaria Deoband):
قوله: “والمال قائم” لأنه لو رضي بذلك بعد ما استهلك الفقير المال لم تصح نيته اهـ
It is mentioned in page no 190 and 191:
وحيلة الجواز أن يعطي مديونه الفقير زكاته ثم يأخذها عن دينه اهـ
Allah knows Best!
Darul Uloom Deoband