-9<=(3x^2+px+6)/(x^2-x+1)<=6
因为x^2-x+1=(x-1/2)^2+3/4>0
所以乘x^2-x+1不等号方向不变
-9<=(3x^2+px+6)/(x^2-x+1)
-9x^2+9x-9<=3x^2+px+6
12x^2+(p-9)x+15>=0
恒成立则12x^2+(p-9)x+15恒大于等于0,即和x轴最多一个交点
所以判别式小于等于0
所以(p-9)^2-720<=0
p^2-18p-639<=0
9-12√5<=p<=9+12√5
(3x^2+px+6)/(x^2-x+1)<=6
3x^2+px+6<=6x^2-6x+6
3x^2-(p+6)x>=0
恒成立判别式小于等于0
所以(p+6)^2-0<=0
(p+6)^2<=0
只有p=-6
他符合9-12√5<=p<=9+12√5
所以p=-6