A player's total cost is essentially the amount the player paid for buying-in, any rebuys, any add-ons, and any bounty chips. Variables for each of these are available. Therefore:
totalCost = buyinCost + bountyChipCost + rebuyCost + addOnCost
So change your formula to:
(sqrt((( numberOfplayers*buyinCost)*(buyinCost/(buyinCost+bountyChipCost+rebuyCost)))) / (r+1.0))
Effectively taking add-ons cost out of the equation.