40x+30( 10-x)≥340,
16x+20( 10-x)≥ 170
The solution is 4≤x≤7.5.
∵x is an integer, ∴x can be 4, 5, 6, 7,
∴ There are four schemes, namely: A4B6A5B5A4A7B3.
(2) A 4 B 6 is the cheapest, and the cost is 18800 yuan.