Because they stated that x=0, therefor a(x+1)^2 becomes a(0+1)^2 = a(1)^2 and (x-3)^2 becomes (0-3)^2 = (-3)^2.
Note that the values of x=0 and y=3 come directly from the graph. You can see that the function (the squiggly line on the graph) is at a y-value of 3 when it crosses the y-axis, which corresponds to an x-value of 0. Therefor x=0 and y=3, which you just plug into the equation.
For those that are wondering why -1 and 3 are roots of multiplicity 2, it is because from the graph we can see that they are roots of y(x)=0 but also they are local minima hence also roots of y'(x)=0.