Answer:
$8,000
Step-by-step explanation:
Since Mary is not 59 1/2 years old yet, the distributions she gets from her Roth IRA will be taxed (she only met the 5 year rule). She will have to pay a 10% penalty and income taxes on the earnings that she withdraws.
Mary will have to pay only for the earnings that she withdraws, and luckily for her the contributions are withdrawn first. Mary's earnings = $38,000 - contributions = $38,000 - $30,000 = $8,000