Given that [tex]y[/tex] attains a maximum at [tex]x=1[/tex], it follows that [tex]y'=0[/tex] at that same point. So integrating once gives
[tex]\displaystyle\int\frac{\mathrm d^2y}{\mathrm dx^2}\,\mathrm dx=\int-8x\,\mathrm dx[/tex]
[tex]\dfrac{\mathrm dy}{\mathrm dx}=-4x^2+C_1[/tex]
[tex]\implies -4(1)^2+C_1=0\implies C_1=4[/tex]
and so the first derivative is [tex]y'=-4x^2+4[/tex].
Integrating again, you get
[tex]\displaystyle\int\frac{\mathrm dy}{\mathrm dx}\,\mathrm dx=\int(-4x^2+4)\,\mathrm dx[/tex]
[tex]y=-\dfrac43x^3+4x+C_2[/tex]
You know that this curve passes through the point (2, -1), which means when [tex]x=2[/tex], you have [tex]y=-1[/tex]:
[tex]-1=-\dfrac43(2)^3+4(2)+C_2[/tex]
[tex]\implies C_2=\dfrac53[/tex]
and so
[tex]y=-\dfrac43x^3+4x+\dfrac53[/tex]