Let y=ax2+bx+c be the quadratic containing the given points. We have to find constants a, b and c.
When x=0, y=0 (the point (0,0)), so 0=c, i.e., c=0.
When x=1, y=-4 (the point (1,-4)), so -4=a+b. Therefore, b=-a-4=-(a+4).
When x=5, y=0 (the point (5,0), so x=5 is the x-intercept and 0=25a+5b.
Substitute for b: 0=25a-5(a+4)=25a-5a-20, 20a=20, a=1, so b=-(1+4)=-5.
y=x2-5x.