Ответ:
[tex]x^2+(a-1)x+a^2+3a=0\\D=(a-1)^2+4\cdot(a^2+3a)=a^2-2a+1+4a^2+12a=5a^2+10a+1\\\\x_1=\frac{-(a-1)-\sqrt{5a^2+10a+1}}2=\frac{1-a-\sqrt{5a^2+10a+1}}2\\\\x_2=\frac{-(a-1)+\sqrt{5a^2+10a+1}}2=\frac{1-a+\sqrt{5a^2+10a+1}}2\\x_1+x_2=4\\\\\frac{1-a-\sqrt{5a^2+10a+1}}2+\frac{1-a+\sqrt{5a^2+10a+1}}2=4\\1-a-\sqrt{5a^2+10a+1}+1-a+\sqrt{5a^2+10a+1}=8\\2-2a=8\\-2a=6\\a=-3[/tex]