Cost of debt and equity calculation