Correct option is D
The interchanges required are ‘willingly’ with ‘foundation’ and ‘money’ with ‘amount’.
The correct sentence after rearrangement of words will be, “After all the foundation had done for her family, she willingly donated a substantial amount of money.”