This a three dimensional function, so we need to look at it from two viewpoints: x and y.
We do this using partial differentials. fx is the partial differential with respect to x, or from the x viewpoint, and we differentiate by treating y terms as constants: fx=-2x+10, which is a straight line. fx=0 when x=5. This is one of the extrema. Differentiate again and we get -2, so x=5 is a maximum.
fy=3y^2-6y-9=3(y^2-2y-3)=3(y-3)(y+1). When y=3 or -1 there's a turning point. Differentiate again: 6y-6. Put y=3 and 6y-6=12 which is positive, so y=3 is a minimum; put y=-1 and 6y-6=-12, which makes y=-1 a maximum.