When the A solution is added (and no B solution is added) to make up the 40% A solution, the concentration of B will automatically be changed depending on the amount of A, so it cannot or need not be specified. However, as will be seen, the concentration of B does in fact automatically change to 60% (see Case 1).
Consider Case 1: the pure solutions of a grams of A and b grams of B, so a/100=0.3, making a=30g and b=70g. Because the solutions are pure there is no other solvent involved to dilute either A or B.
Now add x grams of pure A solution, so (a+x)/(100+x)=0.4, that is, the concentration of A is 40% in the mixture.
a+x=40+0.4x, 0.6x=40-a, x=(40-a)/0.6; since a=30g, x=10/0.6=100/6=50/3=16⅔g (about 16.67g).
We can go on to find out the new concentration of B caused by adding 16⅔g to the mixture. The concentration of B=70/(100+x)=70/116⅔=70×3/350=0.6=60%.
These concentrations fit the criteria given in the question, so 16⅔g (16.67g) of A has to be added to increase the concentration of A from 30% to 40%, while reducing the concentration of B from 70% to 60%.
Now consider Case 2, where a solvent is included, then the initial amounts of pure substances A and B are 0.3a and 0.7b respectively. Adding x grams of solution A implies adding 0.3x of pure A without changing the amount of pure B. We end up with 0.3a+0.3x of pure A and 0.7b (unchanged) in 100+x grams of mixture. a+b=100g as before, so b=100-a grams. But now we have to satisfy the following equations based on concentrations of A and B in the resulting solution:
(0.3a+0.3x)/(100+x)=0.4 and 0.7b/(100+x)=0.6=(70-0.7a)/(100+x). These form a system of equations:
0.3a+0.3x=40+0.4x⇒x=(0.3a-40)/0.1; 70-0.7a=60+0.6x⇒x=(10-0.7a)/0.6;
(0.3a-40)/0.1=(10-0.7a)/0.6, cross-multiplying:
0.18a-24=1-0.07a,
0.25a=25, a=100g. Since we started with 100g of mixture of solutions A and B, this would imply that b=0. It also implies that, by substituting for a, we get x=-100g, clearly impossible. This value of x makes the concentration equations indeterminate (denominator=100+x=0).
So Case 1 seems to represent the intended interpretation of the question, so 16⅔g of solution A has to be added.