I am banging my head on this one, but I dont understand why the total value of debt is 700k (as the answer says). it says if the company defaults, you get 200k. if it does not default, you get 500k. How come the answer is not 500k? recovery rate is 40%, but why the total debt is 700k is a mystery to me.

the solution explanation makes sense, assuming that the numbers 500 and 200 are already probability adjusted (i.e. expected value), which the solution asserts so

The answer assumes the company does not default, after it assumes that default occurs. So, there are two scenarios: default or not default. Suppose the first scenario occurs with probability p, the value of debt must be