The first step is to get your friends to actually reimburse you for the flights. Will you get all $9,000 back? In what form will it be, if so? Check to make sure it's not counterfeit.
Assuming you get all the money back, step two is deciding if you should just bring the cash home or use it in Venezuela. US$9,000 will go a long way down there. You should be able to spend some of it there. Pay out your hotel in cash instead of your credit card. Use cash for everything while there.
Now, assuming what's left isn't 9,000 one-dollar bills but a collection of 100s and 20s, I would just carry it on you as you go through outbound immigration and customs. They're probably not looking at an American leaving with dollars as much as Venezuelans. If there's a legitimate form that asks how much money you have, be truthful. If asked by legitimate immigration and customs, be truthful. Othewise, just put some in your wallet, some in your pockets, some in your shoes (that you're wearing), some in each bag. Spread it out so that if someone does walk away with one of your bags or pickpockets you, you haven't lost everything.
Once through to plane, put it all back together in one pile and don't really worry about it.