as I read it, what I get is that
x = returned profits or yielded interest from investment in A
y = returned profits or yielded interest from investment in B
T = total amount invested or namely A + B.
4000 were invested in A, and it yielded 5%, what's 5% of 4000? (5/100)(4000) = 200 = x.
we know the total amount is T, since A get 4000, B must have gotten T - 4000, or the slack. We also know that B yielded a 2% profit, well, what's 2% of T - 4000? (2/100)(T-4000) = y.
we also know that, whatever "x" and "y" are, their sum total yielded a 4% returns from T, or the total principal, what's 4% of T? (4/100)T = 0.04T.
![\bf \begin{cases} T=\textit{total principal}\\[-0.5em] \hrulefill\\ A=4000\\ x = \stackrel{\textit{5\% of A}}{200}\\[-0.5em] \hrulefill\\ B=T-4000\\ y=\stackrel{\textit{2\% of B}}{0.02(T-4000)} \end{cases} \\\\[-0.35em] ~\dotfill](https://tex.z-dn.net/?f=%5Cbf%20%5Cbegin%7Bcases%7D%20T%3D%5Ctextit%7Btotal%20principal%7D%5C%5C%5B-0.5em%5D%20%5Chrulefill%5C%5C%20A%3D4000%5C%5C%20x%20%3D%20%5Cstackrel%7B%5Ctextit%7B5%5C%25%20of%20A%7D%7D%7B200%7D%5C%5C%5B-0.5em%5D%20%5Chrulefill%5C%5C%20B%3DT-4000%5C%5C%20y%3D%5Cstackrel%7B%5Ctextit%7B2%5C%25%20of%20B%7D%7D%7B0.02%28T-4000%29%7D%20%5Cend%7Bcases%7D%20%5C%5C%5C%5C%5B-0.35em%5D%20~%5Cdotfill)
