There's two ways. One is blind in water practice. No mask swimming with a snorkel in your mouth; just keep trying till you get it. If your wife is weird enough that she does this skill fine without inhaling water, but still have the exhaling nose problem, then try putting the mask on partially so the nose is unsealed (ei bottom of mask skirt is resting on the tip of her nose). Or just practice with a mask on as usual.
The scientific explanation behind it is a bit long but basically goes as so. You need to have independent control of your epiglottis and soft palate.
Your soft palate is the valve behind and above your dangly bit in your throat (the uvula). It blocks air flow from your nose to your throat and opens downward into your throat.
Your epiglottis is responsible for holding your breath and is located below your throat. It blocks air from your lungs to your throat.
The problem with nose breathers is they don't have independent control, so when they stop breathing from their nose, they also hold their breath. So the overall solution to help your wife overcome this problem is simply, keep your soft palate closed so all air flow is through your mouth.
An exercise to break this habit is a 3 parter.
1) Cup your hand over your mouth and try to breath all your lungs out your mouth. Stop all air from escaping using your hand alone.
At an instant, pull your hand away.
Air should immediately escape until you have fully exhaled. If there was a pause, it meant you were holding your breath. If you were successful, move to part 2.
2) Do the same as above, cup your hand over your mouth and try to exhale. This time, with your hand still over your mouth, blocking air, release air out your nose. Without pause you should feel a jolt up and behind your uvula, and air should escape out your nose. This jolt is your soft palate opening opposite of the air flow. If there was no jolt or a pause, then you were holding your breath right before you made the switch. If you were successful, move to part 3.
3) Hold you hand over your mouth and try to exhale. Switch to your nose. Before you finish your exhale this time, switch back to your mouth (your hand should still be blocking). Let some air out by releasing your hand, then quickly cup your hand back to block air and switch back to your nose.
Alternate, keeping pace with a musical tune: one-and-two-and-one-and-two. If you can keep this up and successfully alternate, then congratulations. You found independent control of your epiglottis and soft palate. Remember that feeling and what you did and try to take that skill in the water with a no mask snorkel swim.