marry (one's) way out of (something)
To escape some state or condition by marrying someone with the appropriate means or resources. She says she married for love, but I'm still convinced she just married her way out of bankruptcy. You aren't in love with her—you're just marrying your way out of loneliness!
marry one's way out of something
to get out of something, such as poverty, by marrying someone. She was able to marry her way out of poverty but regretted it in the long run. Sally married her way out of one unhappy home into another one.