Since we are adding a 5% each year, we will proceed as follows, we determine the final percentages and start from "the end to the beginning":

Then:

And for year two:

Finally, for the starting year, we will have:

oneedFrom this, we have that the amount of money we need to have in order to get $50 000 in the interest of 5% is approximately $40 725.31.