Let the numbers of shares invested be a and b, where the a-shares are 120 and the b-shares are 80. The shares have face values of R100. a+b=100, b=100-a. R10000=100 shares with face value R100.
So the amount earned is 120a*0.045+80(100-a)0.04=450; 5.4a+320-3.2a=450; 2.2a=130, a=650/11 and b=450/11.
The amounts invested are R5909.09 and R4090.91.
(The answer given in the question text doesn't sum to R10000, the total amount invested. 2100+6300=8400.)