I'm not sure how you want this to run... whether you are having people type in the commands or you're doing it yourself, or it's being done as part of another script. You didn't really say. So I will just give you the main idea that you'd need.
var %price = $calc(%totalprice / %totalturrets)
echo -a Unit Price: $calc(%price * .06) Demo: %price Comm: $calc(%price * .09)
That assumes you have the total price in a %totalprice variable and # of turrets in the %totalturrets variable and that you want it echoed. Like I said, you didn't give enough information to write a complete script.