indeed it is not correct
you have 95% chance of failure, you will get $3M for your 30 homes. pay off the mortgage, you will still owe to banks $1.5M. Assume you take bankrupcy, you lose 1.5M downpay.
So your gain is 0.95*(-1.5)+0.05*4.5= loss of 1.2 Million.