Optimal capital structure

Company Y requires 10 million capital. The rate of interest on debt is 10% and the tax rate is 40%. What is the optimal percentage of debt, when the model stating the negative value of financial distress V = I*A*X^2 ( where I is the total amount of investment, A is a constant which in this case is 0,05 and X is the proportion of the investment financed through debt) applies?

I'm not sure how to begin solving this. I tried making a formula for WACC and attempted to minimize it but didn't get a reasonable answer.

Please help I'm clueless here :(