a^2+2ab+b^2-2ac-abc+c^2
=(a+b)^2-2c(a+b)+c^2+2bc-abc
=(a+b-c)^2+bc(2-a)
=(m/2+1+m/2+2-m/2-3)^2+(m/2+2)(m/2+3)(2-m/2-1)
=m^2/4+(m^2/4+5m/2+6)(1-m/2)
=(m^2)/4+(m^2)/4+5m/2+6-(m^3)/8-)(5m^2)/4-3m
=-(m^3)/8-(3m^2)/4-m/2+6
a^2+2ab+b^2-2ac-abc+c^2
=(a+b)^2-2c(a+b)+c^2+2bc-abc
=(a+b-c)^2+bc(2-a)
=(m/2+1+m/2+2-m/2-3)^2+(m/2+2)(m/2+3)(2-m/2-1)
=m^2/4+(m^2/4+5m/2+6)(1-m/2)
=(m^2)/4+(m^2)/4+5m/2+6-(m^3)/8-)(5m^2)/4-3m
=-(m^3)/8-(3m^2)/4-m/2+6