We will solve as follows:
*We have the equations:

&

We solve then for the second equation [Either for A or B], that is:

Now, we replace in the first equation and solve for B:



Now, we replace the value of B in the second equation:

So, the investor has 80 shares on stock A and 120 shares on stock B.