The local or global extrema will occur when velocity, dy/dx, is equal to zero.
dy/dx=-6x+18
d2y/dx2=-6
Since acceleration, d2y/dx2, is a constant negative, when dy/dx=0, y is at an absolute maximum value...
dy/dx=0 only when -6x+18=0, -6x=-18, x=3
And the maximum value is:
f(3)=-3(3^2)+18(3)-10
f(3)=17