First let us find the equation of each side of the triangle.

(0,0),(0,4)

It is the equation of the line in the xy plane which connects those two.

Hence,

y=4.

(0,0),(2,4)

y=2x

(0,0),(0,4)

x=0

Inside Triangle

f_x=0

f_y=0

Thus,

3x^2-6y+15=0

-6x-2y=0

Solve, (you are big enough to solve the system thyself).

There exists solutions but not inside the open boundary.

Hence we check the boundary itself.

Line y=4

f(x,4)=x^3-24x-16+15x=x^3-9x-16

Find extreme values on (0,2) and you find there are none.

Now check its boundaries x=0 and x=2

Hence,

f(0,4)=-16 and f(2,4)=8-18-16=-26

Line x=0

f(0,y)=-y^2

Find extreme values on (0,4) and there are none.

Now check its boundaries y=0 and y=4.

f(0,0)=0 and f(0,4)=-16

Line y=2x

f(x,y)=x^3-12x^2-4x^2+15x=x^3-16x^2+15x

Find extreme values on (0,2) and there are none.

Now check its boundaries x=0 and x=2.

f(0,0)=0 and f(2,4)=8-64+30=-26

The smallest values was at,

(2,4)

The largest value was at,

(0,0)