Then the grain transported from warehouse A to warehouse B is 100-x tons.
Then the grain transported from warehouse B to warehouse A is 70-x tons.
Then the grain transported from warehouse B to warehouse B is 80-(70-x)= 10+x tons.
y = 12 * x * 20+ 10 *( 100-x)* 25+ 12 *(70-x)* 15+8 *( 10+x)* 20
=39200-30x
2. Obviously, when x=70, the minimum value of y is 37 100 yuan.
70 tons from warehouse A to warehouse B and 30 tons from warehouse B..
0 tons from warehouse B to warehouse A and 80 tons from warehouse B..