A-4[B-(A+B)/2]
=A-4[(B-A)/2]
=A-2B+2A
=3A-2B
=3(a^3-3a^2+2a-1)-2(2a^3+2a^2-4a-5)
=3a^3-9a^2+6a-3-4a^3-4a^2+8a+10
=-a^3-13a^2+14a+7
A-4[B-(A+B)/2]
=A-4[(B-A)/2]
=A-2B+2A
=3A-2B
=3(a^3-3a^2+2a-1)-2(2a^3+2a^2-4a-5)
=3a^3-9a^2+6a-3-4a^3-4a^2+8a+10
=-a^3-13a^2+14a+7