You wanted math, so here you go. Im making some crude assumptions here and ignoring the cost of cashing out that 401k, as well as student loan interest, and investment contributions.
Shes forgoing $125k of income for 7 years. Assuming no raises and 3% inflation, thats ($802,148.99) in todays money.
An additional $200,000 in debt over the next 4 years has a present value of ($191,430.57)
Assuming no income for the first 4 years, then $45k a year for the next 3, thats a present value of $116,486.12.
The rough cost of attending med school: $877,093.44.
Now to calculate how long that will take you to pay back.
Grow 877,093.44 at 3% for the next 7 years as thats when shell start earning her new $350k salary.= $1,081,565.50
At $350k a year, thatll take her a little over 3 years to make up the cumulative cost of the education, so youll be a net even, approximately 10 years from today.
I could be a little more scientific in my approach, but I can't figure out where my financial calc is, so I relied on some random internet sites.