The first derivative is #f'(x)=6x-3x^2=3x(2-x)#, which has roots at #x=0# and #x=2#. These are the critical point, and also the possible locations of local extrema.
Since the second derivative is #f''(x)=6-6x#, we get #f''(0)=6>0# and #f''(2)=-6<0#. The fact that #f''(0)>0# (and the fact that #f''# is continuous) implies that the graph of #f# is concave up near #x=0#, making, by the Second Derivative Test, #x=0# the location of a local minimum.
The fact that #f''(2)<0# (and the fact that #f''# is continuous) implies that the graph of #f# is concave down near #x=2#, making, by the Second Derivative Test, #x=2# the location of a local maximum.
The local minimum value (output) is #f(0)=5# and the local maximum value (output) is #f(2)=5+12-8=9#.