For each firm,its goal is to maximize the profit.In a market of free entry ,
it requires P=MC.
TC=AC*y=4y+y*(2-y)^2
MC=d(TC)/dy=3*y^2-8*y+8
Solve this second-oder equation 3*y^2-8*y+8-P=0,we get
y=4/3+((3P-8)^0.5)/3 or y=4/3-((3P-8)^0.5)/3(This does not make sense,for higher P results in higher y for supplier)
and P must greater than min(AC)=4
So supply function for each firm is
y=4/3+((3P-8)^0.5)/3,P>=4,
y=0 P=4
y=0,P