Two inequalities of type B component 4x+6 (40-x) < = 196 are combined to get 22.
So there are nine ways.
2. Find the minimum value of 20x+ 18(40-x) and simplify it to the minimum value of 2x+720. The minimum value is when x=22.
Therefore, the assembly scheme is A 22 sets and B 18 sets, and the total cost is 764 yuan.