The following year, C invested 30W. At the end of the year, A recovered the principal and interest 1. 15X.
In the third year, B invested 40W and D invested {1. 15X-40}. Recover the principal and interest at the end of the year {1.15x-40} *1.06.
In the fourth year, A invested {1.15x-40} *1.06.
In the fifth year, A recovered {1.15x-40} *1.06 *1.15, B recovered 40* 1.25 and C recovered 30 *.