Hm, let's define variables.
Let x be the number of items A.
Let y be the number of items B.
We know that Price for A = 0.23n (for

) + 0.18(x - n)
Price for B = 0.15y
Now, total gives:
0.23 n + 0.18(x-n) + 0.15y = 139.5
Second equation:
x = y
Substituting in first equation:
0.23n + 0.18(x - n) + 0.15x = 139.5
Assuming that there is less than 150 items of a, makes x - n = 0 and x = n
0.23x + 0 + 0.15x = 139.5
x = 367
But x should have been less than 150!
So, we know that x is greater than 150, so, n = 150
0.23(150) + 0.18(x - 150) + 0.15x = 139.5
34.5 + 0.18x - 27 + 0.15x = 139.5
0.33x = 132
x = 400
So, y = 400