how to calculate debt and equity financing